It isn't splitting on the 'two three' because it doesn't match.
/ \s{1,}/ matches a space followed by one or more whitespace characters
(you have a space in front of your \s)
-----Original Message-----
From: John Bruin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 5:37 PM
To: [email protected]
Subject: Splitting on white space
Can anyone please tell me why the code below is not splitting the 'two
three'?
<snip>
my $string = 'one two three four';
my @temp = split(/ \s{1,}/,$string);
<snip>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>