in reply to Re^3: Do not understand code
in thread Do not understand code

> to understand what "the default variable" refers too.

We could consider adding $DEF or $DEFAULT for $_ to Perl.

> @; = q<Hi>; say @SUBSEP

I suppose these are just glob aliases, that's why they work for all types associated to a symbol.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^5: Do not understand code
by Eily (Monsignor) on Oct 02, 2017 at 17:01 UTC

    I suppose these are just glob aliases, that's why they work for all types associated to a symbol.
    Yup, as confirmed by reading the code for English. @- and $- have different names though, so only the ARRAY and SCALAR portion of the glob are used in those cases.

    I was about to say that if you want to have a longer name instead of $_ you can just use a lexical instead (I was thinking of for loops), but I forgot about grep and map where you have to use $_. $CURRENT would work in those cases.