in reply to Printing the last few elements of an array.

Hi jonnyfolk,

one way would be
#!/usr/bin/perl -w use strict; my $record='DATA'; open (FILE, "$record") or die $!; my @record = reverse <FILE>; print "@record[0..9]";

cheers

thinker

Replies are listed 'Best First'.
Re: Re: Printing the last few elements of an array.
by jonnyfolk (Vicar) on Dec 16, 2002 at 14:31 UTC
    Thanks, thinker. Quick'n'easy - just the job!