Perl Whitespace Reg Expression
Jorge Almeida
jalmeida
Sun Oct 9 06:15:58 PDT 2005
On Sat, 8 Oct 2005, Steve Jardine wrote:
> Alright you Perl Heads, here's one for you.
>
> I have a line like this:
>
>
> abcdef<1 to many spaces>more text
>
>
> I want to use the splt command so I can get to the "more text" part of the
> line, but I do not know how many spaces there may be - it could vary. So,
>
> @line = split(/ /, $_);
> $line[1] = ...
>
@line = split(/ +/, $_);
--
Jorge Almeida
More information about the Linux-users
mailing list