Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: To read files from two dir

by GrandFather (Saint)
on Apr 14, 2022 at 02:12 UTC ( [id://11142974]=note: print w/replies, xml ) Need Help??


in reply to Re^5: To read files from two dir
in thread To read files from two dir

We should emphasize for pragovnj's sake that using my in for loops to localize the loop variable is extremely highly recommended. Failing code as shown by you is almost always a logic error as well as a syntax error because the loop variable is aliased to each of the loop values and any variable of the same name outside the loop is not affected by the machinations of the loop!

In particular a Perl for loop variable is not like a C for loop variable (where the loop variable retains its last value).

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-24 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found