Last active
March 29, 2019 08:45
-
-
Save worthmine/893fb31d319441e047b82491083de324 to your computer and use it in GitHub Desktop.
where are global vars?
This file contains 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
use feature qw(say); | |
package Some; | |
no strict; # to access to ${::,}; | |
use warnings; | |
local $, = ','; # ${Some::,} is ',' now? | |
say ${::,} || 'nothing'; # 'nothing' | |
say ${main::,} || 'nothing'; # 'nothing' | |
say ${Some::,} || 'nothing'; # 'nothing' | |
# where is $,? | |
{ | |
my @num = qw(0 1 2 3 4 5 6 7 8 9); | |
say @num; # '0,1,2,3,4,5,6,7,8,9' it works! | |
} | |
say '---'; | |
use English; | |
say $OUTPUT_FIELD_SEPARATOR; # ',' | |
say $OFS; # ',' | |
say $,; # ',' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment