goatse

Is the Perl Goatse 'Secret Operator' efficient?

The "goatse operator" or the =()= idiom in Perl causes an expression to be evaluated in list context. An example is: my $str = "5 and 4 and a 3 and 2 1 BLAST OFF!!!"; my $count =()= $str =~ /\d/g; # 5 matches... print "There are $count numbers in your countdown...\n\n"; As I interprete the use, this is what happens: $str =~ /\d/g ...