I haven't Benchmarked against anything, but unpack might be faster for splitting to an array:
>perl -wMstrict -le "my $str = 'abcde'; my @chrs = unpack '(a)*', $str; print qq{'$_'} for @chrs; " 'a' 'b' 'c' 'd' 'e'
In reply to Re: Efficient walk/iterate along a string
by AnomalousMonk
in thread Efficient walk/iterate along a string
by gje21c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |