in reply to File::Copy - not working!
2 - No warnings or strictures.
3 - As the others have said, you should use File::Basename to get the file basename, not this kludgery.
4 - System commands return errors, but you're not even looking at it. Errors from daughter processes are in the variable $?. Use it.
system("cp $tmpfile $copypath/$att_file") == 0 or die "Cannot copy $tmpfile to $copypath:$?\n";
5 - How can we know if $tmpfile has a value? You don't show us the tmpFileName subroutine code nor what is contained in the $clientattachment variable.
6- If I try $tmpfile = tmpFileName($clientattachment) || die("Failed");, it always dies. .
It does? Do you even have a tmpFileName sub?
--
Regards,
Helgi Briem
helgi DOT briem AT decode DOT is
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: File::Copy - not working!
by bodmin (Sexton) on Jun 19, 2003 at 13:46 UTC | |
by helgi (Hermit) on Jun 19, 2003 at 14:29 UTC | |
by Anonymous Monk on Jun 20, 2003 at 10:37 UTC |