Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Pitfalls met while opening multiple files

by armstd (Friar)
on Jul 24, 2011 at 16:08 UTC ( #916420=note: print w/ replies, xml ) Need Help??


in reply to Pitfalls met while opening multiple files

Without digging into it, my guess is that you're hitting an issue with indirect object syntax. Maybe the syntax you'd like to use just removes too many hints for the compiler to figure out how to feed open properly.

http://www.modernperlbooks.com/mt/2009/08/the-problems-with-indirect-object-notation.html
http://perldoc.perl.org/perlobj.html#Indirect-Object-Syntax

I think in this case, the brevity of your code is really not helping you. What other debugging steps have you taken? Have you tried breaking down your code, eliminating the for loop, etc? Do you know the value of $_->[2] in your example? (not that that has anything to do with your issue...) Since it's strict complaining, have you tried turning off strict refs to see if anything else goes wrong?

--Dave


Comment on Re: Pitfalls met while opening multiple files

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-09-02 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls