in reply to regex problem
open(F,"foo"); foreach(<F>){ if ($_ =~ /^iff/){ print "A line starts with iff\n"; }elsif($_ =~ /^if/){ print "A line starts with if\n"; } } close F;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex problem
by monarch (Priest) on Jun 08, 2005 at 12:55 UTC |