#!/usr/bin/perl -w use strict; use Getopt::Std; use Data::Dumper; my %switches; getopts('x:o:d:m:', \%switches); print Dumper \%switches;