![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: regex to an array , is there a better way to do thisby moritz (Cardinal) |
on Jul 08, 2009 at 16:42 UTC ( #778339=note: print w/replies, xml ) | Need Help?? |
Your input happens to be valid Perl syntax, so if you know exactly that your input is in this format (and contains no evil things), you can simply write:
Or you could simplify your code a bit:
Can be written shorter and clearer as
There's really no point in having @array and @arraydigit separate.
In Section
Seekers of Perl Wisdom
|
|