Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl's command line snippet which I read from a perl article ( perl tutrous )

by Hue-Bond (Priest)
on Sep 06, 2006 at 07:23 UTC ( [id://571387]=note: print w/replies, xml ) Need Help??


in reply to perl's command line snippet which I read from a perl article ( perl tutrous )

-i tells Perl that the files read with the diamond operator (<>) are going to be edited in place, and that a backup of the original file will be kept, using the extension specified. So, -i~ will create a copy of the file with a tilde appended to its name.

But, where's the <> coming from? It's from -p, which causes the program to be enclosed into a loop that does a while(<>).

Whether you committed a mistake or not, depends on what you intended to do ;^).

--
David Serrano

  • Comment on Re: perl's command line snippet which I read from a perl article ( perl tutrous )

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found