usage: getcmd.pl command –key=value ……..
#!/usr/bin/perl # use strict; my $cmdline; foreach my $c (@ARGV){ $cmdline.=$c; } print $cmdline,"\n"; my @list=split(/--/,$cmdline); print "LIST[0]: $list[0]\n"; print "CMD:",shift @list,"\n"; foreach my $c (@list){ if ($c =~/(\S+)=(\S+)/){ print "K=$1, V=$2\n"; } }