Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^8: Can't figure out how to include LAST member of the array

by afoken (Chancellor)
on Feb 10, 2021 at 20:27 UTC ( [id://11128196]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Can't figure out how to include LAST member of the array
in thread Can't figure out how to include LAST member of the array

cat myfile.txt | yourscript.pl

Don't bother the cat. A simple I/O redirection is sufficient here:

yourscript.pl < myfile.txt

And as a bonus, the version without cat also works on Windows.

See also Re: Perl output and uniq.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^9: Can't figure out how to include LAST member of the array
by bliako (Monsignor) on Feb 10, 2021 at 23:19 UTC

    oops bitten by the cats! Thank you for not linking the useless use of cat!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found