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
Previous slide
Next slide
Back to first slide
View graphic version