Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Reversing of list through STDIN

by Lawliet (Curate)
on Jul 05, 2013 at 17:44 UTC ( [id://1042751]=note: print w/replies, xml ) Need Help??


in reply to Reversing of list through STDIN

Au contraire, it seems to, indeed, reverse the order of the lines:

$ perl rev.pl Enter some lines, then press Ctrl-D: test 123 done

Output:

done 123 test

Perhaps you are interpreting the meaning of "reverse" differently. What, exactly, are you expecting for output?

(By the way, it is good practice to use warnings; use strict; in your perl programs. Doing so will save you time in the long run by catching silly mistakes while improving your coding habits.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-16 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found