Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Printing the last few elements of an array.

by tachyon (Chancellor)
on Dec 17, 2002 at 10:58 UTC ( [id://220489]=note: print w/replies, xml ) Need Help??


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

# Yet Another Way To Do It @ary = qw ( 1 2 3 4 5 6 7 8 ); print pop @ary, "<br>\n" for 1..3; # or print "$_<br>\n" for reverse @ary[-3..-1];

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://220489]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found