Paresh,

Why doesn't this work then...

$string = "Business&PersonalFAD AFD:test(Regional)";

@line = split/\s+/, $string;

Now $line[1] prints nothing?  Am I doing something wrong here?

Dan

-----Original Message-----
From: Paresh Kakrecha [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 21 February 2002 10:40 AM
To: Daniel Falkenberg; [EMAIL PROTECTED]
Subject: Re: Splitting variable...


What you are doing is correct.

-paresh.
At 10:20 AM 2/21/2002 +1030, 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]


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

Reply via email to