Dear Japhy,

Thank you!  I thought I had to open the directory then delete the 
file to use unlink.  Thank you again.

>On Jul 15, Teresa Raymond said:
>
>>opendir (ADS, "$filepath/") || die "Can't open directory\n";
>>if (-e $file)
>>{
>>     unlink "$file";
>>}
>
>Why are you opening a directory, but not using it?  At first, I'd think
>you meant to just say:
>
>  unlink "$filepath/$file" if -e "$filepath/$file";
>
>But you say the -e works.
>
>So I'm left assuming you don't have the permission to delete the file.
>
>  use CGI::Carp qw( fatalsToBrowser );
>  unlink $file or die "Can't delete $file: $!";
>
>--
>Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
>I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
>Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
>Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
>Acacia Fraternity, Rensselaer Chapter.         Brother #734
>**      Manning Publications, Co, is publishing my Perl Regex book      **

*** Teresa Raymond
*** http://www.mariposanet.com
*** [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to