On 1/23/07, Tony Heal <[EMAIL PROTECTED]> wrote:
The end process will be myscript.pl -rf /home/myfolder and that will pass the -rf and /home/myfolder arguments to the rm command after copying everything to the trashcan.
Why not simply move things to the trashcan, and skip rm altogether?
The script as is gets an error when run. My problem is how to make the argument '-rf' pass to the system() command then I plan to use ARGV[0] to pass the directory.
Maybe I don't understand you correctly. But @ARGV is used for passing arguments into your Perl program, not to another program. Pass the system() command any arguments you'd like, though.
$options = `print @option`;
Are you running an external program called print? What does it output? Maybe you meant to use Perl's print operator, or something else? $options = "@option"; # maybe this? $options = join "", @option; # or this?
system("ls -$options");
Why are you using ls? Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/