redmustang has asked for the wisdom of the Perl Monks concerning the following question:
Been studying hashes and lists but still need help making first loop
Want to this to $data1,$bob,$dog etc.. creates byte count of the string data
$data1_enc=encode('UTF-8',$data1); $data1_count=length $data1_enc; $bob_enc=encode('UTF-8',$bob); $bob_count=length $data2_enc;
Create a routine that adds preceding characters
making $some_count name variable a fixed length (8 character example) 150 add 5 x's , 1000 add 4 x's
$data1_count=150 $bob_count=1000 $data1_count_fixed= xxxxx150 $bob_count_fixed= xxxx1000
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Loop or sub routine
by GrandFather (Saint) on May 12, 2011 at 02:29 UTC | |
|
Re: Loop or sub routine
by johngg (Canon) on May 12, 2011 at 12:32 UTC | |
|
Re: Loop or sub routine
by Marshall (Canon) on May 12, 2011 at 15:19 UTC | |
|
Re: Loop or sub routine
by cjb (Friar) on May 12, 2011 at 10:23 UTC |