There are several things that are not efficient in your script as shown in your OP.
while (my $line=<DATA>) { chomp($line);..
#file: test.pl #!/usr/bin/perl -w use strict; use v5.10; my $pattern = qr/test/; while (my $line=<DATA>) { chomp($line); $line =~ /($pattern)/p; my $result = $line. ' => matched:'.${^MATCH}.$/; print $result; } __DATA__ test1a.txt test1b.txt test1c.txt
In reply to Re: strange thing in perl's eval function
by 2teez
in thread strange thing in perl's eval function(solved))
by a369
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |