#I made this change first... - 1 while(readline($data[$i]->{FH})); + while(readline($data[$i]->{FH})){ + 1; + };
Wheras in perl 5.6 I get:main::(./overlay.pl:5): die("usage: overlay file1 file2\n") unless sca +lar @ARGV == 2; DB<1> t Trace = on DB<1> n main::(./overlay.pl:6): my @data; DB<1> n main::(./overlay.pl:7): for(my $i=0; $i < scalar @ARGV; $i++){ DB<1> n main::(./overlay.pl:8): open($data[$i]->{FH}=gensym, $ARGV[$i]) || d +ie("overla y($ARGV[$i]): $!\n"); DB<1> n Symbol::gensym(/usr/perl5/5.00503/Symbol.pm:86): 86: my $name = "GEN" . $genseq++; Symbol::gensym(/usr/perl5/5.00503/Symbol.pm:87): 87: my $ref = \*{$genpkg . $name}; Symbol::gensym(/usr/perl5/5.00503/Symbol.pm:87): 87: my $ref = \*{$genpkg . $name}; Symbol::gensym(/usr/perl5/5.00503/Symbol.pm:88): 88: delete $$genpkg{$name}; Symbol::gensym(/usr/perl5/5.00503/Symbol.pm:89): 89: $ref; main::(./overlay.pl:9): while(readline($data[$i]->{FH})){ DB<1> n main::(./overlay.pl:12): $data[$i]->{LINE} = $.; DB<1> n main::(./overlay.pl:13): seek($data[$i]->{FH}, 0, 0); DB<1> n main::(./overlay.pl:7): for(my $i=0; $i < scalar @ARGV; $i++){
... main::(overlay.pl:9): while(readline($data[$i]->{FH})){ DB<1> n main::(overlay.pl:10): 1; DB<1> n main::(overlay.pl:9): while(readline($data[$i]->{FH})){ DB<1> n main::(overlay.pl:10): 1; DB<1> n ...
--
perl -p -e "s/(?:\w);([st])/'\$1/mg"
In reply to Re: Some missing textutils
by belg4mit
in thread Some missing textutils
by belg4mit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |