or use (and IMHO better because it clearly designates it as a regex to the reader) the normal //:
my ($one, $two) = split( /\d+\s+/, $line);
BUT.. you need the delimeter as $one .. so need to capture it:
my ($one, $two) = split( /(\d+\s+)/, $line);
BUT .. that will have the space in $one .. so use a look-behind (see perlre) instead .. (and add the LIMIT)
my ($one, $two) = split /(?<=\d+)\s+/, $line, 2;
so to OP -- yes, it's possible w/split & regex ;)
|