Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^5: How to access a hash from another file

by tospo (Hermit)
on Oct 18, 2011 at 12:53 UTC ( #932142=note: print w/ replies, xml ) Need Help??

in reply to Re^4: How to access a hash from another file
in thread How to access a hash from another file

Whatever works best for you! Just a short comment: you can easily combine the 4 for loops in your code example into a single one without pushing the commands into an array of commands, just increment $i inside the loop then do your tests for i%2 using one if-else control structure.
The whole set-up still looks awkward to me but that doesn't matter and you should go with it if it works. After some more experience you might come back to this and then immediately see a better way of doing it. If I now look at some of my early Perl scripts it causes me physical pain :-). It's just the way it is. Good luck with your further adventures in Perl!

Comment on Re^5: How to access a hash from another file

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-11-29 11:10 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls