in reply to SOLVED:download a file from a web

You should consider changing your system statements from

system "mkdir $Dir";

to

system "mkdir $Dir" or die "mkdir of '$Dir' failed: $?";

Anything could be the cause: permission restrictions, ill-constructed director names...

Have you stepped through your program in the debugger?

Which of your print statements get executed?

Replies are listed 'Best First'.
Re^2: download a file from a web
by Your Mother (Archbishop) on Apr 17, 2009 at 19:01 UTC

    Since system returns false on success, better to test ... == 0 or die...

Re^2: download a file from a web
by afoken (Chancellor) on Apr 17, 2009 at 22:12 UTC

    You shouldn't run a shell at all to create a directory, Perl has a portable buildin mkdir() function for that, including reliable return values.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Quite so, but there were several system calls. If one is going to use it, it's a good idea to check its' success or failure. (Though one should take pains to do so correctly,)