Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Which way is recommended ?

by jeffa (Bishop)
on Nov 21, 2008 at 18:52 UTC ( #725206=note: print w/replies, xml ) Need Help??


in reply to Re^2: Which way is recommended ?
in thread Which way is recommended ?

Exactly. If you are feeling (over)confident you can just code this:

open (FILE, $filename) or die $!; print while <FILE>;

Or on the command line:

perl -pe '$_' file.txt

UPDATE: thanks for the correction, quester

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^4: Which way is recommended ?
by quester (Vicar) on Nov 22, 2008 at 07:56 UTC
    Pardon me, but even one liners need to enable warnings...
    $ perl -wpe '$_' file.txt Useless use of a variable in void context at -e line 1. ...
    It should actually just be
    $ perl -wpe '' file.txt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://725206]
help
Chatterbox?
erix wonders... how is the neurocent doing these days?
[marto]: Invest in my crypto currency, derpcoin
[erix]: ( and only a single italian in the Giro top 10 -- surely you guys are not trying hard enough! )
[marto]: it does literally nothing, solves no problems that aren't already addressed, but it's real easy to mine, because nobody is doing it
[LanX]: cb60.datenzoo.de is producing broken links for me ...
erix foresees fungibility problems ;)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2018-05-25 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?