Skip to content

Instantly share code, notes, and snippets.

@worthmine
Last active March 29, 2019 08:45
Show Gist options
  • Save worthmine/893fb31d319441e047b82491083de324 to your computer and use it in GitHub Desktop.
Save worthmine/893fb31d319441e047b82491083de324 to your computer and use it in GitHub Desktop.
where are global vars?
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