Nick Leverton <[EMAIL PROTECTED]> writes: > > Thanks for your opinion, it's appreciated. But, pulling in > > Getopt::Long would require yet another module which I would want to > > avoid, especially since it still isn't fully GNU Getopt compatible in > > that it insists on a space between a short option and its value, which > > is quite annoying. > > As to the syntax. The current way of specifying -f, using CGI param(), > requires -f=/etc/foo. I tested the syntax and found that it in the form > I used, Getopt accepts the same -f= syntax as the existing Debian patch. > So no user of -f (if there are any) would have to change. This usage > also accepts "-f /etc/foo"
If that's the case, couldn't you do soemthing like (my perl is old and rusty so apologies for the pseudo-perl): while (@ARGV) { if (/^-([a-z])=(.*)$/) { # do a big switch on $1, setting variables to $2 } } and avoid the use of modules altogether? You could even use this regex: /^([a-z]=?(.*)$/ To allow -f=foo and -ffoo Neale -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]