Hi , when you use unlink you need to specify the full pathname of the file, such as
unlink "$basedir/$mesgdir/$file"
Check out this node Re: File Attributes in Win32 for my reply to a similiar problem : )
UPDATE: Put the pathname in double quotes. Thanks to MeowChow's reminder
In reply to Re: Deleting specified files and directories
by Eureka_sg
in thread Deleting specified files and directories
by Sadmachine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |