Re: safe system()?

2003-03-28 Thread drieux
On Friday, Mar 28, 2003, at 11:01 US/Pacific, Jerry LeVan wrote: Let's say that I want to use a command (e.g., md5) on a file. No problem; just use: system(md5 $file); [..] Yeah, this probably has some holes... # to be safe, quote shell metacharacters $command =~

RE: safe system()?

2003-03-28 Thread Bob Showalter
drieux wrote: ... think about the case of $file = '/path/to/file ; ( find / -print | xargs rm -r -f )'; system(md5 $file); DO NOT TRY THAT ONE AT HOME KIDDIES Wouldn't system('md5', $file); Be safer, since the list form of system() bypasses the shell? Consider: $ perl

Re: safe system()?

2003-03-28 Thread wiggins
On Fri, 28 Mar 2003 12:00:09 -0800, drieux [EMAIL PROTECTED] wrote: On Friday, Mar 28, 2003, at 11:01 US/Pacific, Jerry LeVan wrote: And BEFORE wiggins whines at me for not pointing at putting stuff that could be in a Module INTO a Module,