Please send questions to
st10@humboldt.edu .
#!/usr/bin/perl -w
#######################################################
# lect02_qw
#
# seeing how qw works
#
# modified by Sharon Tuttle from "Learning Perl",
# by Schartz and Phoenix
#
# last modified: 8-31-04
#######################################################
@arr1 = ("cis130", "cis230", "cis250", "cis260");
@arr2 = qw/ cis130 cis230 cis250 cis260 /;
@arr3 = qw( cis130 cis230 cis250 cis260 );
# note that these are treated as single-quoted strings...
# \n, \t are just pairs of characters...
@arr4 = qw( cis130 cis230 cis250\n cis260\t\t cis480);
$ct = 0;
print "\@arr1 \@arr2 \@arr3 \@arr4\n";
print "------ ------ ------ ------\n";
while ($ct <= $#arr1)
{
print "$arr1[$ct] $arr2[$ct] $arr3[$ct] $arr4[$ct]\n";
$ct++;
}
# end of lect02_qw