The four parameter substr is clearly the cleanest solution though.($chars, $string) = unpack "a$n a*", $string;
Makeshifts last the longest.
In reply to Re: Answer: How do I pull n characters off the front of a string?
by Aristotle
in thread How do I pull n characters off the front of a string?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |