in reply to Re^2: When doesn't the flip-flop operator work in all scalar contexts?
in thread Why doesn't the flip-flop operator work in all scalar contexts?
My take on it: The 'if' always follows a simple statement so the parser takes 'next,' as statement. Depending on context (in this case void?) this will be either a comma operator or a list with a dangling comma. It seems the comma operator also throws away dangling commas like a list:
> perl -e ' $d= (1,2); print "$d\n";' 2 > perl -e ' $d= (1,2,); print "$d\n";' 2
|
---|