Anchor the regexes better, some of them caused problems with perl 5.8.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3629 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2003-04-29 12:38:32 +00:00
parent 0e712a4b26
commit 56a6d59237
2 changed files with 7 additions and 7 deletions

View file

@ -60,7 +60,7 @@ while(<ENG>) {
}
# get rid of DOS newlines
$_ =~ s/\r//g;
if($_ =~ / *([a-z]+): *(.*)/) {
if($_ =~ /^ *([a-z]+): *(.*)/) {
($var, $value) = ($1, $2);
$set{$var} = $value;
@ -75,13 +75,13 @@ while(<ENG>) {
close(ENG);
while(<LANG>) {
if($_ =~ / *\#/) {
if($_ =~ /^ *\#/) {
# comment
next;
}
# get rid of DOS newlines
$_ =~ s/\r//g;
if($_ =~ / *([a-z]+): *(.*)/) {
if($_ =~ /^ *([a-z]+): *(.*)/) {
($var, $value) = ($1, $2);
# print "$var => $value\n";

View file

@ -11,12 +11,12 @@ MOO
my %ids;
open(ENG, "<$ARGV[0]");
while(<ENG>) {
if($_ =~ / *\#/) {
if($_ =~ /^ *\#/) {
# comment
next;
}
$_ =~ s/\r//g;
if($_ =~ / *([a-z]+): *(.*)/) {
if($_ =~ /^ *([a-z]+): *(.*)/) {
($var, $value) = ($1, $2);
# print "$var => $value\n";
@ -37,13 +37,13 @@ close(ENG);
undef %set;
open(NEW, "<$ARGV[1]");
while(<NEW>) {
if($_ =~ / *\#/) {
if($_ =~ /^ *\#/) {
# comment
next;
}
$_ =~ s/\r//g;
if($_ =~ / *([a-z]+): *(.*)/) {
if($_ =~ /^ *([a-z]+): *(.*)/) {
($var, $value) = ($1, $2);
$set{$var} = $value;