in reply to Alias vs Reference
Some places aliases are used:
- $_ in foreach, map and grep and named loop variables in foreach
- $a and $b in a sort block
- $a and $b in List::Util's reduce function and List::MoreUtils's pairwise function
- Each element of @_ for the actual arguments in a subroutine call
- By packages importing symbols
- By an our declaration, which creates a lexically scoped alias
- You can explicitly create an alias via typeglobs
See also "alias" in perlglossary and Item 118 "Access the symbol table with typeglobs" in Effective Perl Programming.
Update: added named loop variables in foreach. Thanks Jenda.
In Section
Seekers of Perl Wisdom