Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@kyanny /

#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
my @c = ();
my @m = ();
GetOptions('c=s' => \@c, 'm=s' => \@m);
my $argument = shift @ARGV;
die "a mandatory parameter `argument'" unless $argument;
use Data::Dumper; print Dumper {'c' => \@c, 'm' => \@m, 'argument' => $argument};
$ perl -c name1 -c name2 -m name3 argument
$VAR1 = {
          'argument' => 'argument',
          'c' => [
          'm' => [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.