in reply to Code Error Question
In other words, unlink ("delete") the file specified in $file or die giving the system's error message.unlink($file) or die $!;
If you want to have a clearer error message, use:
update: I have no idea what the /$size/ match is supposed to do, but it's probably wrong. Also, having a variable named $file and another named $filename in a related code block is suspicious - especially if you're not using strict and warnings.unlink($file) or die "Can't unlink '$file': $!";
|
|---|