in reply to selecting characters from a variable
It sounds to me as though you really want to do a split, parsing your string into tokens, delimited by the ':' character.
my @tokens = split /:/,$line;
If you really do want to split up the line into an array of characters, you can simply use the split without a delimiting argument, which will cause your string to be split into one-character array elements.
Update: As the man without a Pony indicates below, what I mean when I say 'without a delimiting argument' is this:
my @tokens = split //,$line;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: selecting characters from a variable
by Fletch (Bishop) on Jun 02, 2006 at 15:03 UTC |