Please send questions to
st10@humboldt.edu .
#!/usr/bin/perl -w
#######################################################
# lect03_chomp1
#
# experiment: what DOES chomp return?
#
# modified by Sharon Tuttle from "Learning Perl",
# by Schartz and Phoenix
#
# last modified: 9-6-04
#######################################################
$val1 = "dog";
$val2 = "dog\n";
$chomp_return1 = chomp($val1);
$chomp_return2 = chomp($val2);
# $val3 is undef, to see what chomp returns then!
$chomp_return3 = chomp($val3);
print "chomp(\$val1) returns $chomp_return1\n";
print "chomp(\$val2) returns $chomp_return2\n";
print "chomp(\$val3) returns $chomp_return3\n";
# end of lect03_chomp1