in reply to Basic search question
You don't want to use select, at least not for this. Here it is setting the default file handle for print statements and has global effect. It will be clearer and less error prone to write print OUT $line;
I'd forget about using temporary files and do something like
foreach my $line ( split /\n/, $q ) { print "$line\n" if $line =~ /^Last 24 hours/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Basic search question
by colonelcrayon (Novice) on Jan 07, 2008 at 00:56 UTC |