in reply to Implicit split to @_
If you want to do it like that for whatever reason you may have (rather than using length as others have suggested) you will need to use a temporary array:
The do block is there just to reduce the scope of the temporary array - you can do away with it if you want to predeclare the array.my $sa = do { my @tmp = split //, $vartable{$a} };
Of course I would recommend that you do this with length
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Implicit split to @_
by ysth (Canon) on Apr 14, 2005 at 22:30 UTC | |
by gellyfish (Monsignor) on Apr 15, 2005 at 10:12 UTC | |
by Anonymous Monk on Apr 15, 2005 at 15:12 UTC |