ShayShay has asked for the wisdom of the Perl Monks concerning the following question:
Which results in:my @files = <*.HTM>; foreach $file (@files) { if ($file =~ m/IDX/gi){print $file."\n";} }
What I did instead was (note the ~ placement) this:ACIDX.HTM APIDX.HTM ...
Which results in:my @files = <*.HTM>; foreach $file (@files) { if ($file = ~m/IDX/gi){print $file."\n";} }
What is my mistake doing?4294967295 4294967295 ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interesting Mistake
by cdarke (Prior) on Feb 22, 2010 at 15:37 UTC | |
|
Re: Interesting Mistake
by FunkyMonk (Bishop) on Feb 22, 2010 at 15:46 UTC | |
|
Re: Interesting Mistake
by toolic (Bishop) on Feb 22, 2010 at 15:48 UTC | |
|
Re: Interesting Mistake
by biohisham (Priest) on Feb 22, 2010 at 15:58 UTC |