CSE 341 -- S. Tanimoto
Perl Arrays, Functions, Lists, Refs,
Etc
13
Perl: Pronouns
$_
# “It” (scalar default variable)
@people = ("John", "Tran", "Pam");
foreach $person (@people) {
print $person, " "; }
foreach (@people) {
print
$_
, " "; }
foreach $person (@people) {
print; print " "; }
John Tran Pam John Tran Pam John Tran Pam