Assuming you want to guarantee 12 letters, I'd use a regular expression:
$_ = 'abcdefghijkl'; my ($a,$b) = (/^([a-z]{6})([a-z]{6})$/i) ? ($1,$2) : (undef)x2; print "$a, $b\n" if defined $a;
In reply to Re: string spliting
by hbm
in thread string spliting
by andromeda08
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |