in reply to Problem in mirror method

You did not show the value of $filename. If $filename is empty, you're likely to get this error.

Maybe now is a good time to start with the Basic debugging checklist. That way, you can do many checks yourself without needing to wait for monks to reply.

Replies are listed 'Best First'.
Re^2: Problem in mirror method
by perlmad (Sexton) on May 26, 2016 at 06:23 UTC

    Sorry Corion i forget to mention file name, I am getting filename from http::response

    $res=$mech->res(); $filename=$res->filename(); # it has current web page filename

    The file name is not empty but i'm getting this error , Any Idea about this

      What makes you so certain that $filename is not empty?

      Does your program work if you hardcode the output filename?

      Did you print $filename just before your call to ->mirror()?

        I have checked before mirror that the filename is not empty

        filename is FNMA_2016C01_RMT.pdf link updated...