in reply to Bitwise operators
but I've started the next chapter which is on arrays and hashes, so although I'm not sure how to do it yet, I'm thinking there's a probably a shorter way? Paul.#!/usr/bin/perl #converter.plx use warnings; use strict; print "Please input a decimal no. to convert to binary : "; chomp (my $value = <STDIN>); print "$value & 1", "$Value & 2", "$value & 4"; print "$value & 8", "$value & 16", "$value & 32"; print "$value & 64", "$value & 128\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bitwise operators
by liverpole (Monsignor) on Dec 25, 2006 at 19:34 UTC | |
by thevoid (Scribe) on Dec 25, 2006 at 22:14 UTC |