in reply to Passing Options
The beautiful thing about Getopt::Long is that you can write custom argument handlers. I like them a lot. The below is somewhat slapped together, but should do approximately what you want.
#!/bin/perl use strict; use Getopt::Long; my @words; my $wordsub = sub { while (@ARGV){ if ( $ARGV[0] !~ /^-/ ){ push @words, shift @ARGV } else { last } } }; GetOptions('words' => $wordsub);
@words should contain a list of words. You should be able to hack together the same for your release variable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing multiple arguments to a flag
by DS (Acolyte) on Aug 12, 2002 at 18:42 UTC |