in reply to Regex error when [] occurs in file..
You probably want something like:
while (chomp(my $temp=<INPUT>)){ print Dumper $temp; $temp =~ s/#.*//; # remove comments if ($temp =~ /^\s*$/){ next; } print "after regex:\n"; print Dumper $temp; print "end\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex error when [] occurs in file..
by why_bird (Pilgrim) on Mar 03, 2008 at 16:03 UTC | |
by Joost (Canon) on Mar 03, 2008 at 16:11 UTC | |
by almut (Canon) on Mar 03, 2008 at 16:31 UTC |