Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 ( #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
Node Status?
node history
Node Type: note [id://571387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2020-02-28 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (125 votes). Check out past polls.

    Notices?