use warnings; use strict; use Getopt::Std; my %options; getopts('abc', \%options); while (my ($key, $value) = each %options) { print "Option: $key, value: $value\n" } print "Remaining arguments: @ARGV\n";