perlb has asked for the wisdom of the Perl Monks concerning the following question:
while ($i < 4) { $ID1=`printf "%024x", $i`; printf "Value of ID1 = $ID1\n"; $ID1 = join ' ', unpack("(A2)*",$ID1); print "After join command:$ID1\n"; $i++; } bash-3.00# ./genID.pl Value of ID1 = 000000000000000000000000, After join command:00 00 00 00 00 00 00 00 00 00 00 00 , Value of ID1 = 000000000000000000000001, After join command:00 00 00 00 00 00 00 00 00 00 00 01 , Value of ID1 = 000000000000000000000002, After join command:00 00 00 00 00 00 00 00 00 00 00 02 , Value of ID1 = 000000000000000000000003, After join command:00 00 00 00 00 00 00 00 00 00 00 03 ,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl Question
by ikegami (Patriarch) on Feb 22, 2008 at 21:52 UTC | |
|
Re: perl Question
by FunkyMonk (Bishop) on Feb 22, 2008 at 21:59 UTC | |
|
Re: perl Question
by chromatic (Archbishop) on Feb 22, 2008 at 22:06 UTC |