On Thu, Dec 20, 2001 at 05:06:29PM -0800, Peter Jay Salzman wrote:
> system("rm $filename");
>
> and $filename = "a file", you get an error because you're trying to delete
> two files, "a" and "file".
>
> what's the proper way of quoting $filename so that the shell sees the file
> "a file" and not the two non-existant files "a" and "file"?
perlfunc -f system indicates
system("rm",$filename);
would work. Switch from single entry, to array, and the quoting seems
taken care of.
You could also use
system("rm '$filename'")
--
Ted Deppner
http://www.psyber.com/~ted/
_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech