wildrover
05-31-2008, 02:28 AM
$r=<STDIN>;
chomp $r;
if ($r == 10) {
print '$r is 10';
} else {
print '$r is something other than 10';
$r=10;
print '$r is set to 10';
say i used "surf" for the stdin.
my little code will say $r does not = 10
instead of it saying "surf does not =10"
i realy dont understand why it would do this.
its realy boggleing my mind.
chomp $r;
if ($r == 10) {
print '$r is 10';
} else {
print '$r is something other than 10';
$r=10;
print '$r is set to 10';
say i used "surf" for the stdin.
my little code will say $r does not = 10
instead of it saying "surf does not =10"
i realy dont understand why it would do this.
its realy boggleing my mind.