# split works on whitespace by default
@somearray = split $string;

deen
-- 
Deen Hameed, Accidental Programmer [EMAIL PROTECTED]

On Thu, 21 Feb 2002, Daniel Falkenberg wrote:

> Hey all,
> 
> I am working with a variable at the moment where I want it to be split
> at every 'space' such as ...
> 
> $string = "the quick brown fox";
> 
> How would I go about doing this?  Would I do something like the
> following...
> 
> @line = split/\s+/, $string;
> 
> $line[0] = the
> $line[1] = quick
> $line[2] = brown
> $line[3] = fox
> 
> Any suggestions?
> 
> Regards,
> 
> Dan
> 
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to