in reply to Split a Line

To split a string into chunks based on field LENGTH, not field DELIMITER, use unpack().
my ($x, $y, $z) = unpack "A10 A3 A*", "example 987testing 1, 2, 3"; # $x = "example" # $y = 987 # $z = "testing 1, 2, 3"
You'll notice $x had trailing spaces removed. If you want to keep trailing spaces, use "a" instead of "A" in the unpack format string. Read perldoc perlpacktut for more.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart