Eric Hennessey wrote:
> I've got an issue with a split function, or at least I THINK that's
> where I'm having the problem.
>
> Given that $line is one line of output from a command in column format,
> I run the following:
>
> $line = `some command`;
> chomp $line;
> @fields = split $line;
>
> This should produce a list of strings from $line, right?
>
> Any idea why I'd have an empty list when $line contains the expected
> data as verified from a print command?
You left the pattern off.
split /PATTERN/,EXPR,LIMIT
split /PATTERN/,EXPR
split /PATTERN/
split Splits a string into a list of strings and returns that list. By
default, empty leading fields are preserved, and empty trailing ones
are deleted.
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs