Thanks, John.
__
Bryan R Harris wrote:
>
> > @myarray = split ' ', $fContent[$i];
>
> Is this special form of split documented somewhere? Does it still split
on
> all whitespace?
perldoc -f split
[snip]
As a special case, specifying a PATTERN of space
(`' '') will
Bryan R Harris wrote:
>
> > @myarray = split ' ', $fContent[$i];
>
> Is this special form of split documented somewhere? Does it still split on
> all whitespace?
perldoc -f split
[snip]
As a special case, specifying a PATTERN of space
(`' '') will split on white space just as `split
> @myarray = split ' ', $fContent[$i];
Is this special form of split documented somewhere? Does it still split on
all whitespace?
My problem is that the string I'm splitting may or may not have leading
whitespace...
TIA.
- B
__
Bryan R Harris wrote:
>
> Is it possible to
Bryan R Harris wrote at Wed, 29 May 2002 01:36:23 +0200:
> Is it possible to return elements 2 (index 1)
> thru end of the results of a split?
>
> @myarray = (split(/\s+/,$fContent[$i]))[1..-1];
>
> seems right, but doesn't work...
>
The problem of your code is that 1 .. -1 is an empty li
Bryan R Harris wrote:
>
> Is it possible to return elements 2 (index 1) thru end of the results of a
> split?
>
> @myarray = (split(/\s+/,$fContent[$i]))[1..-1];
>
> seems right, but doesn't work...
If you are doing this because split/\s+/ returns an empty element in
$myarray[0] you should u
> > Is it possible to return elements 2 (index 1) thru end of the results of a
> > split?
> >
> > @myarray = (split(/\s+/,$fContent[$i]))[1..-1];
> >
> > seems right, but doesn't work...
It seems right to me too, however, I bet you are getting an array out of
bounds problem. First line is bl
Bryan R Harris wrote:
>
> Is it possible to return elements 2 (index 1) thru end of the results of a
> split?
>
> @myarray = (split(/\s+/,$fContent[$i]))[1..-1];
>
> seems right, but doesn't work...
>
> (I sure hope this list never starts charging on a per-answer basis... =)
>
> - B
Id p
Is it possible to return elements 2 (index 1) thru end of the results of a
split?
@myarray = (split(/\s+/,$fContent[$i]))[1..-1];
seems right, but doesn't work...
(I sure hope this list never starts charging on a per-answer basis... =)
- B
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
F