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\
In reply to Re: Implicit split to @_
by gellyfish
in thread Implicit split to @_
by samizdat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |