http://www.perlmonks.org?node_id=943147

saintj0n has asked for the wisdom of the Perl Monks concerning the following question:

I am a newbie that is reading a Perl tutorial and doing the exercises at the end of each chapter. I am stumped by one particular exercise. It says to ask the user to input an integer less than 256 ad then use perl to convert it to a binary numbers. The hint says to use the "and" operator 8 times in the conversion process. Anyone know how this would work?