Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: trying to read files in @ARGV but getting GLOB error! :(

by zentara (Archbishop)
on Jun 26, 2017 at 12:43 UTC ( [id://1193556]=note: print w/replies, xml ) Need Help??


in reply to Re^2: trying to read files in @ARGV but getting GLOB error! :(
in thread trying to read files in @ARGV but getting GLOB error! :(

for ($i=1; $i<=3; $i++) { open $input1, '<', "$path\/File-$molec1-cluster$i.out" or die $!; push @ARGV, "$path\/File-$molec1-cluster$i.out"; for ($j=2; $j<=3; $j++) { open $input2, '<', "$path\/File-$molec2-cluster$j.out" or die $!; push @ARGV, "$path\/File-$molec2-cluster$j.out";

I don't understand why this pattern appears...?

Hi, it does look odd. The only thing I see is missing } sub-ending brackets in your code, maybe that missing sub closure is important. As always, a small-self-contained working example would be useful here. Because usually, when you need to make an example, you see the error yourself.


I'm not really a human, but I play one on earth. ..... an animated JAPH

Replies are listed 'Best First'.
Re^4: trying to read files in @ARGV but getting GLOB error! :(
by fasoli (Beadle) on Jun 26, 2017 at 12:55 UTC
    No, the script has no syntax errors if that's what you mean by } sub-ending bracket missing? I just copied and pasted it quickly to show that I think this is where the problem lies. I still can't figure it out and it's been hours. I'll be posting an updated version of the script with an output included, I really can't figure this out :(

      Please pay heed to zentara's advice about the Short, Self-Contained, Correct Example: "a small-self-contained working example would be useful here. ... usually, when you ... make an example, you see the error yourself." Even if you never present this to anyone else, I know from personal experience that it can be enormously useful in debugging.


      Give a man a fish:  <%-{-{-{-<

      My other thought is maybe you have hyperthreading enabled on a multiple core computer, and it's gone haywire. :-) My suggestion is to start printing out $i and $j and your @array and your @ARGV at key points in the code and see what happens as it loops thru.

      I'm not really a human, but I play one on earth. ..... an animated JAPH

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193556]
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: (5)
As of 2024-04-24 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found