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

Re^2: Renaming all files in a directory

by Anonymous Monk
on Feb 02, 2021 at 12:46 UTC ( [id://11127810]=note: print w/replies, xml ) Need Help??


in reply to Re: Renaming all files in a directory
in thread Renaming all files in a directory

Why needs the counter be inside a BEGIN block?
  • Comment on Re^2: Renaming all files in a directory

Replies are listed 'Best First'.
Re^3: Renaming all files in a directory
by Cristoforo (Curate) on Feb 02, 2021 at 16:57 UTC
    In this example, perl is reading line by line, (perl -nle ...) and you want the counter to only be initialized (once) at the start of the script.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (None)
    As of 2024-04-25 01:45 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found