in reply to get.bat halts

By the way. If you have to ^C it and perl goes bellyup again, immediately bring up the task manager you should be able to see the child perl process that is still running when the parent died and kill it. That would sort out the messed up cmd session.

In the long term, rather than running perl from a cmd session, then shelling out from that to start another cmd session which starts another perl to use lwp to do the download, you'd be much better off to cut out the two middlemen and just use:

use LWP::Simple; for ( @urls ) { getstore( $theUrl, $theOutputFile ) or warn "Failed to fetch $theU +rl: $!\n"; }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: get.bat halts
by archfool (Monk) on Aug 08, 2007 at 13:27 UTC
    I have noticed the Windows version of AS Perl tend to lock files hard. You need to kill the perl that has the file open before you can write or delete the file.

    I had this problem with Archive::Zip... I have to close each zip member, and then the zip before I can even rename the zip file!