in reply to Re: Not exactly new, but still fun
in thread Not exactly new, but still fun

interesting.. perl 5.6.0 doesn't like it. it works in 5.005_03. the intent was for the comma to be used in scalar context. this should cause it to evaluate the search/replace on the LHS and then return $foo on the RHS.

Looks like they changed this behavior for several functions (ord, oct, etc).

5.005_03:

perl -le 'my $x = ord(1,2);print $x'; 50

5.6.0:

perl -le 'my $x = ord(1,2);print $x'; Too many arguments for ord at -e line 1, near "2)" Execution of -e aborted due to compilation errors.