in reply to Bitwise operators

Heh, beat me to it... just came back to say that I've just discovered the perlfaq and in perlfaq4 found the answer to my troubles using unpack
#!/usr/bin/perl #converter.plx use warnings; use strict; print "Please input a decimal no. to convert to binary : "; chomp (my $value = <STDIN>); $value = unpack("B*", pack("N", $value)); print "$value";
Thanks for everyone's help and patience, hopefully the perlfaq will provide some answers from hereon in, though it's nice to know there is somewhere to come and ask very basic questions without setting off howls of derisive laughter!

Replies are listed 'Best First'.
Re^2: Bitwise operators
by davido (Cardinal) on Dec 24, 2006 at 17:45 UTC

    While you're diving into Perl's documentation, don't forget about the pack() tutorial: perlpacktut, as well as the individual docs for pack and unpack. Whenever I use pack and unpack I find myself referring back to pack's documentation. And perlpacktut is extremely helpful when you're starting out with this stuff.


    Dave

      nice, will do