in reply to RegEx Problem?
use strict; my $line; open FH, $ARGV[0] or die "Couldn't open input file" while ($line = <FH>){ print $line if $line =~ /*I*like*foo*/; } close FH;
If you're on a *nix system, and all you want to do is print those lines, wouldn't it be easier to just use the grep utility?
There is no emoticon for what I'm feeling now.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: RegEx Problem?
by bart (Canon) on Feb 25, 2003 at 08:03 UTC | |
by Popcorn Dave (Abbot) on Feb 25, 2003 at 16:31 UTC | |
|
Re: Re: RegEx Problem?
by OverlordQ (Hermit) on Feb 25, 2003 at 06:41 UTC | |
by hardburn (Abbot) on Feb 25, 2003 at 14:53 UTC | |
by waxmop (Beadle) on Feb 25, 2003 at 21:10 UTC | |
by merlyn (Sage) on Feb 25, 2003 at 22:01 UTC |