in reply to Is this system call hazardous for my computers health??
isn't going to do what you think. Using the list form of system instructs Perl to avoid using the shell, and to fork and exec rm directly, with the specified arguments. Since it's the shell that is responsible for expanding the *, and you're not using the shell, the * is never expanded, and is passed to rm literally. You end up attempting to remove a single file named *.system("rm","-f","$tmp_dir","*")
I suspect that what you should have done was simply
as I think someone else already pointed out.system("rm", "-rf", $tmp_dir);
|
|---|