$inside++;
my $attr=$1;
- while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\"> ]*))//) {
+ while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\> ]*))//) {
my ($var, $cont)=($1, $2);
$cont =~ s/^\"(.*)\"$/$1/;
$hash{$var}=$cont;
# section; end of file implies end of section.
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
- return @this; # empty when end of section detected
+ return @this;
}
sub partexists {
}
#
-# Load a specified file an return it as an array
+# Load a specified file and return it as an array
#
sub loadarray {
my ($filename)=@_;
open(TEMP, ">$file1");
for(@$firstref) {
- print TEMP $_;
+ my $l = $_;
+ $l =~ s/\r/[CR]/g;
+ $l =~ s/\n/[LF]/g;
+ print TEMP $l;
+ print TEMP "\n";
}
close(TEMP);
open(TEMP, ">$file2");
for(@$secondref) {
- print TEMP $_;
+ my $l = $_;
+ $l =~ s/\r/[CR]/g;
+ $l =~ s/\n/[LF]/g;
+ print TEMP $l;
+ print TEMP "\n";
}
close(TEMP);
my @out = `diff -u $file2 $file1 2>/dev/null`;