Personally, I think this makes the meaning clearer, but I'm sure others may disagree.#!perl -l my $str = "here are some words"; my $count = @{[ $str =~ /\S+/g ]}; print $count;
In reply to Re: Perl Idioms Explained - my $count = () = /.../g
by truedfx
in thread Perl Idioms Explained - my $count = () = /.../g
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |