in reply to Re^3: Cool example of list assignment usage
in thread Cool example of list assignment usage
I can't guess what =()= is supposed to do.
How strange, it is a very common Perl idiom:
my $count =()= /$regex/g
Maybe this is similar to this regex construct, which I use even though it looks very non-intuitive to me:my ($match) = ($string =~ m/regex/);
Why so? Incidentally I think you want a /g in the match, and the second pair of parens is clearly unnecessary.
Update: did a Super Search and added link to the explanation of the idiom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Cool example of list assignment usage
by perrin (Chancellor) on Jul 23, 2007 at 17:56 UTC | |
by blazar (Canon) on Jul 23, 2007 at 17:59 UTC |