#!/usr/bin/perl use strict; use Getopt::Std; { my %opts = (); getopts( 'w:h:', \%opts ); print "w: $opts{w}; h: $opts{h}\n"; } #### $ perl opts.pl -w wassup -h hey #### w: wassup; h: hey