Now then, does $line end up altered after the first if so that the 2nd if is less effective?my $line = $_; if($line =~ s/^.+\/\.(.*)$/$1/) { print ". extension ".$line."\n"; } elsif ( $line =~ s/^.+\.(.*)$/$1/) { print "Extension ".$line."\n"; }
In reply to messing up $line? by perlNinny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |