Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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)


Comment on Re^3: Which way is recommended ?
Select or Download Code
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2015-07-07 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls