[ale] perl -e

Ed Cashin ecashin at noserose.net
Wed May 7 10:05:13 EDT 2014


My perl is very rusty, but "--" is often a way to say, "I'm done with
options.  Pass the rest through."

perl -e 'print $ARGV[0]' -- -f

... prints "-f".

On Wed, May 7, 2014 at 9:34 AM, Lists <lists at serioustechnology.com> wrote:
> So, I've written a perl subroutine that uses getopts. I can call this
> subroutine from a perl script fine. What is like to do is call it from a
> shell script via 'perl -e'. I know I can pass parms to the subroutine as
> such:
>
> perl -e '...' Args here
>
> And the routine will see them via ARGV. If I try to pass flags (-f) they are
> apparently passed to perl rather than the module.
>
> Solutions?
>
> Geoffrey Myers
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
  Ed Cashin <ecashin at noserose.net>
  http://noserose.net/e/
  http://www.coraid.com/


More information about the Ale mailing list