You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerardo Schimpf <sc...@bibleinfo.com> on 2002/07/25 05:17:40 UTC
embperl unlink problem...
Hi,
I'm having problem with the UNLINK PERL command under embperl...
This is my example code, copy works, rename works, but unlink no...
I can't figure out what it's going on... Can someone help me? Thanks
:+)
embperl code:
[-
use File::Copy;
$imbox="/var/www/html/interface/mail";
$home="/var/www/html/interface/mail/home";
$vol="dirvol2";
$file="1017708295.5733.nono";
$tmp="$file.tmp";
copy ("$imbox/$file","$home/$vol/$tmp");
rename ("$home/$vol/$tmp", "$home/$vol/$file");
unlink ("$imbox/$file");
-]
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: embperl unlink problem...
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
first of all the mailing list address is embperl@perl.apache.org.
I'm having problem with the UNLINK PERL command under embperl...
This is my example code, copy works, rename works, but unlink no...
I can't figure out what it's going on... Can someone help me? Thanks
The only reason I see why it doesn't work, is that the user as which your
httpd runs doesn't have the permission to delete the file.
Writing
unlink ("$imbox/$file") or die "Cannot unlink $imbox/$file ($!)" ;
will give you more informations. (It's always good to check for errors and
print them out :-)
Gerald
:+)
embperl code:
[-
use File::Copy;
$imbox="/var/www/html/interface/mail";
$home="/var/www/html/interface/mail/home";
$vol="dirvol2";
$file="1017708295.5733.nono";
$tmp="$file.tmp";
copy ("$imbox/$file","$home/$vol/$tmp");
rename ("$home/$vol/$tmp", "$home/$vol/$file");
unlink ("$imbox/$file");
-]
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org