-
-
Save exodist/57aba2e754ff11abb1db1c084b2a992c to your computer and use it in GitHub Desktop.
wtf?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exodist@abydos main $ perl -e 'BEGIN { *foo = sub { 512 } }; my $xxx = 16; my $yyy = foo - $xxx; print "$yyy\n";' | |
512 | |
foo() instead of foo fixes it | |
exodist@abydos main $ perl -e 'BEGIN { *foo = sub { 512 } }; my $xxx = 16; my $yyy = foo() - $xxx; print "$yyy\n";' | |
496 | |
using sub() to define foo also fixes it. | |
exodist@abydos main $ perl -e 'BEGIN { *foo = sub() { 512 } }; my $xxx = 16; my $yyy = foo - $xxx; print "$yyy\n";' | |
496 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment