Timothy Johnson <[EMAIL PROTECTED]> writes:
> sub GetMultiOps{ > $ref = $_[0]; > while($ARGV[0] !~ /^-\w$/){ > $_ = shift @ARGV; > push @{$ref},$_; > } > } > > ### END ##################### > > Which should theoretically give you one array for each option and one array > as a catch-all to use for all of the elements not associated with an option. Yeah, that does look like a better approach, though I'm not really catching what this bit actually does: `GetMultiOps(\@eArray)'. Not familiar with the syntax. I think I see the intent though. I'm now thinking this might be better if used with regular Getopt::Std like: if ($opt_e) { $opt_e would be the first and get shifted by Getopt::Std Then trot out your sub for any others. Resetting ARGV as you go. } I think that would allow the existing Getopt::Std to work its magic and take care of any undesired looping you mentioned. So really just `while looping' away any extra args at each option. I haven't implemented this but I think it will work and be cleaner and less error prone. Your sub idea is vastly superior to if/elsing till I puke. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]