in reply to Script critique requested
use warnings; use strict; print "Enter a decimal number, less than 256, to be converted to a bin +ary number: "; chomp(my $dec = <STDIN>); printf "%08b\n", $dec;
See also the FAQ:
perldoc -q convert
But, yours is an interesting use of the <=> operator.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Script critique requested
by jhumphreys (Novice) on Oct 04, 2012 at 17:39 UTC |