Or, as Jonathan (?) pointed out to me not too long ago, there is a special
case of split that wipes leading whitespace before splitting on /\s+/:

split(' ', $line);

Enjoy.

- B

__________________



Hi Paul,

Just use :

($month, $day, $time) = (split /\s+/, $line);

the /s+ stands for 1 or more spaces.

Regs David
-----------------

>
> I have a logfile that has the following format:
>
> month day time
>
> The problem is splitting on the "space" - split(/ /). Sometimes there are
more than one space. How can I get perl to split on 1 or more spaces?
>
>
> --
> 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]




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

Reply via email to