Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: loop issue...

by Fletch (Bishop)
on Mar 20, 2009 at 15:22 UTC ( #752083=note: print w/replies, xml ) Need Help??

in reply to Re: loop issue...
in thread loop issue...

Sounds like awfully familiar advice, doesn't it OP? :)

He's at least checking your open calls which is good, but he'll be kicking himself n months hence when he has to spend time chasing down why things don't work that a simple opendir( FOO, $dir ) or die "opendir '$dir': $!" would have caught.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^3: loop issue...
by Nkuvu (Priest) on Mar 20, 2009 at 16:52 UTC

    The OP copied the lines for the open calls that I provided -- but skipped the rest of the script. Granted I missed the check on the readdir, but I also noted that (and at least failure there would just mean that @files would be empty, rather than trying to alter files in the wrong directory).

    I had hoped that the OP would see what was intended with the advice given, but I think that's too much to ask. I was toying with the idea of completely revising the script (I have a current script that's taking a very long time to execute, so have some downtime while I wait for it) but I think it would be rather pointless.

Re^3: loop issue...
by lomSpace (Scribe) on Mar 20, 2009 at 16:35 UTC
    I got the right output. Thanks!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2023-01-27 07:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found