in reply to perl do's and don'ts

Use more whitespace (blank lines) and indentation to separate each bit of code - you don't have to but it makes things much easier to identify ... this is all - of course - up to the individual person... but if I were to do this I would have formatted it like so ...
print("\n\nEnter a binary number:"); chomp($binary=<STDIN>); if ( $binary =~/\D.*/ ) { print("Not a binary number!\n"); exit; } if ( $binary =~/\d.*/ ) { @eachnum = split (//, $binary); $good = 1; foreach (@eachnum){ next if /0/ || /1/; print("A binary number contains 1's and 0's!\n"); $good = 0; last; } if ( $good == 1 ) { convb2d(); } }


-mr.dunstan