On May 31, Jonathan E. Paton said:

> --- Ned Cunningham <[EMAIL PROTECTED]> wrote: > Snip
>> 
>> I want to write to a file all of the array(@data), except the first
>> field????
>
>@data[1..-1]
>
>means the array @data from element 1 to the last element.

Sadly, Perl does not support that syntax.  Ranges must be
low..high.  @foo[1..-1] doesn't work.

However:

  shift @data;
  print @data;

does.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


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

Reply via email to