Dorf has asked for the wisdom of the Perl Monks concerning the following question:
So, the 'if' statement passes on the first list element, and fails afterwards.my %resultsHash; my @results = glob ( "//foo/bar/dead/*/*/report.html" ); for my $result (@results) { if ($result =~ ?//foo/bar/dead/(.*)/(.*)/report.html?) { $resultsHash{$2}[0] = $1; $resultsHash{$2}[1] = $result; } }
Retitled by Steve_p from 'Iterated Regulare Expression Failure'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Iterated Regular Expression Failure
by diotalevi (Canon) on May 04, 2005 at 19:13 UTC | |
|
Re: Iterated Regular Expression Failure
by dragonchild (Archbishop) on May 04, 2005 at 19:13 UTC |