Re: elements 2 thru end of the results of a split

2002-05-29 Thread Bryan R Harris
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

Re: elements 2 thru end of the results of a split

2002-05-29 Thread John W. Krahn
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

Re: elements 2 thru end of the results of a split

2002-05-29 Thread Bryan R Harris
> @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

Re: elements 2 thru end of the results of a split

2002-05-29 Thread Janek Schleicher
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

Re: elements 2 thru end of the results of a split

2002-05-28 Thread John W. Krahn
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

Re: elements 2 thru end of the results of a split

2002-05-28 Thread Jonathan E. Paton
> > 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

Re: elements 2 thru end of the results of a split

2002-05-28 Thread Todd Wade
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

elements 2 thru end of the results of a split

2002-05-28 Thread Bryan R Harris
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