Seshouan has asked for the wisdom of the Perl Monks concerning the following question:
if I have $val = 238; I want to get an array @arr that looks like the following: $arr[0] = 2; $arr[1] = 3; $arr[2] = 8; or the same thing for a string if I have $val = "hello"; I want: $arr[0] = "h"; $arr[1] = "e"; $arr[2] = "l"; $arr[3] = "l"; $arr[4] = "o"; thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: making an array out of a string or integer
by ColtsFoot (Chaplain) on Feb 12, 2002 at 15:50 UTC | |
|
Re: making an array out of a string or integer
by rdfield (Priest) on Feb 12, 2002 at 15:58 UTC | |
|
Re: making an array out of a string or integer
by dreadpiratepeter (Priest) on Feb 12, 2002 at 16:01 UTC |