On Saturday 03 May 2008 13:13, David C. Rankin wrote:
Listmates,
Perl Q # 2 - and counting. Working with perl, I can't figure out why if I read a number (floating point) from STDIN and then chomp($float); it returns 1. Seems crazy. I can remove the new-line by dividing by 1.0, but that just seems like a hack. What say the gurus? Here is the script:
Chomp is not a function in the sense you're using it. It alters the variable you pass in-place, rather than returning the "comped" value. Change that line to this: chomp($TEMPC); # Works! Removes New Line from Number By the way, there's a typo in the output line.
-- David C. Rankin
Randall "I told you so" Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org