interpreting script

From: Shawn (spedwards_at_qwest.net)
Date: 01/31/04


Date: Fri, 30 Jan 2004 21:56:44 -0700

Hi,

I'm having a hard time interpreting a portion of a perl script (below). I
think its looking for the file pattern then determining the age and removing
it if its over 30 days old. The line with >30 has kind of got me. Any help
would be greatly appreciated.

   @down_file_list = `/bin/ls *.downloaded *.kl2_download | grep -v
"_ppsd.zip" 2> /dev/null`;

   foreach $down_file (@down_file_list) {
       chop($down_file); #remove newline
       if (-M $down_file > 30 ) {
          print "Removing file $down_file in $search_dir/$home_dir\n";
          system("/bin/rm -f $down_file");
       }
    }



Relevant Pages

  • Re: interpreting script
    ... :I'm having a hard time interpreting a portion of a perl script. ... :think its looking for the file pattern then determining the age and removing ...
    (comp.lang.perl.misc)
  • Removing Blank Lines
    ... Removing Blank or Empty Lines from a text file. ... Just posting this so I ... the last link and perl script is the one that worked btw: ...
    (freebsd-newbies)