perlmad has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks
I am using mirror method to get the update webpage content
here is my code
if($mech->mirror("url","$filename") == RC_NOT_MODIFIED ) { print " link not Updated \n\n\n"; if($mech->response()->is_success){ print " response is success\n\n"; print " content :",$mech->response()->as_strin +g,"\n\n"; } else { print "failure \n\n"; } } else { print " link updated...\n\n"; $mech->save_content($filename); }
When i run this above code i get some irregular files except download file
# Command line output error Cannot rename '-23348' to '': No such file or directory $ls -23094 -23348 code.pl config.ini downloads downloads1 downloads2 + Download_Status.doc output.txt $ ls ./* -lthr 727 May 26 09:41 ./config.ini 9.2K May 26 09:54 ./code.pl 11M May 26 09:54 ./-23094 113 May 26 09:55 ./Download_Status.doc 26M May 26 10:04 ./-23348
my doubt is why am getting this "-23348" file and how can i get update page content???
Please Help me to find a correct path
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem in mirror method
by Corion (Patriarch) on May 26, 2016 at 06:11 UTC | |
by perlmad (Sexton) on May 26, 2016 at 06:23 UTC | |
by Corion (Patriarch) on May 26, 2016 at 06:40 UTC | |
by perlmad (Sexton) on May 26, 2016 at 07:17 UTC | |
by Corion (Patriarch) on May 26, 2016 at 07:21 UTC | |
by ablanke (Monsignor) on May 26, 2016 at 07:32 UTC | |
Re: Problem in mirror method
by Anonymous Monk on May 26, 2016 at 08:00 UTC | |
by perlmad (Sexton) on May 26, 2016 at 10:47 UTC |