in reply to $_ and nested while loops w/angle operator
Or, that wonderful scalar range operator again...
my %data = (); my $query; while (<FH>) { if (my $result = /^"\@QUERY:(.*?)"$/ .. /^"\@ENDQUERY"$/) { next if $result =~ /E/; if ($result == 1) { $query = $1; next; } push @{$data{$query}}, $_; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: $_ and nested while loops w/angle operator
by eric256 (Parson) on Apr 05, 2004 at 23:40 UTC | |
by runrig (Abbot) on Apr 06, 2004 at 00:36 UTC |