Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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?
[Lady_Aleena]: $ grep --include=*.p[lm] -Ern 'get_(array|hash| data)' does not do multiline search.
[Discipulus]: focus on Perl LA; you can already search multiline patterns
[erix]: grep is a program, not a regex-engine
[Tanktalus]: perldigious: I'm 20 years in, and I don't want to move ;)
[Lady_Aleena]: erix, right, it searches files for a pattern. pcregrep is supposed to do the same thing with the addition of being able to search multiline.
[erix]: ah, pcregrep is a stanalone program?
[Lady_Aleena]: erix, yes.
[Lady_Aleena]: pcre stands for 'Perl Compatible Regular Expressions'.
[erix]: ok, ok, I thought you meant the engine
[perldigious]: Tanktalus: Ha, understandable, that does make it harder when you don't want to move. I assume you are looking at remote work from home jobs too?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2017-05-23 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?