<div dir="ltr"><div><div>Take a look at the &#39;-s&#39; option, which may do what you need, sort of, but it looks like using &quot;--&quot; will probably be what you are looking for.  perldoc perlrun<br><br></div>Also, instead of reinventing the wheel, take a look at the standard modules: Getopt::Std and Getopt::Long.  These are built-in and you should not need to install via CPAN.  You can use them from the command line like:<br>
</div>    perl -MGetopt::Long -e&#39;...&#39; -- -opt1 -opt2<br><br><div><div><div><div class="gmail_extra"><br clear="all"><div>❧ Brian Mathis</div>
<br><br><div class="gmail_quote">On Wed, May 7, 2014 at 9:34 AM, Lists <span dir="ltr">&lt;<a href="mailto:lists@serioustechnology.com" target="_blank">lists@serioustechnology.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto"><div>So, I&#39;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 &#39;perl -e&#39;. I know I can pass parms to the subroutine as such:</div>
<div><br></div><div>perl -e &#39;...&#39; Args here</div><div><br></div><div>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. </div><div><br></div>
<div>Solutions?<br><br><span style="font-size:13pt">Geoffrey Myers</span></div></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br></div></div></div></div></div>