note
jasonk
<p>Even in those cases, there are usually clearer solutions...</p>
<code>
use Getopt::Long qw( GetOptionsFromArray );
sub do_awesome_things {
GetOptionsFromArray( \@_,
'files=s' => \my @files,
'verbose!' => \my $verbose,
);
warn "Going to process files @files. "
. "Verbose is ".( $verbose ? 'ON' : 'OFF' ).".\n";
}
do_awesome_things -v => -file => 'foo.txt', -file => 'bar.txt';
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-231445">
<hr>
<a href="http://www.jasonkohles.com/">www.jasonkohles.com</a><br>
<small>We're not surrounded, we're in a target-rich environment!</small><br>
</div></div>
742531
742570