On Wed, 2008-11-19 at 12:12 -0500, Richard Lee wrote:
> I thought I could do this,
> 
> if ( -f q#/tmp/yahoo.* ) {
>         system("rm -rf /tmp/yahoo.*");
> }
> 
> what am i missing?
> 

for my $file ( glob( '/tmp/yahoo.*' ) ){
  unlink $file if -f $file;
}

See:
      * perldoc -f unlink
      * perldoc -f glob
      * perldoc perlfunc and search for -f under "Alphabetical Listing
        of Perl Functions"

-- 
Just my 0.00000002 million dollars worth,
  Shawn

The map is not the territory,
the dossier is not the person,
the model is not reality,
and the universe is indifferent to your beliefs.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to