in reply to Re^3: How to escape white space in command line arguments
in thread How to escape white space in command line arguments

See Re: Executing "perl -pi -e" in perl script
  • Comment on Re^4: How to escape white space in command line arguments

Replies are listed 'Best First'.
Re^5: How to escape white space in command line arguments
by Marshall (Canon) on Apr 13, 2010 at 08:57 UTC
    Cute. This code uses a local variable for @ARGV. We should start a new thread if we are going to debate the proper uses and abuses of local variables. This thread doesn't need local. For future reading see.. local vars in Perl.
      This code uses a local variable for @ARGV

      Um no. It properly localizes @ARGV and then sets @ARGV. You say Nobody but the O/S should set @ARGV but you forgot this is perl.

        This is an "outlier" situation and we are getting off topic from the thread. The OP wants to call program2 from program1 and pass some command line arguments to program2, possibly derived from command line arguments to program1. There is no need here for a local @ARGV.