Skip to content

Instantly share code, notes, and snippets.

@leejarvis
Created February 12, 2012 01:13
Show Gist options
  • Save leejarvis/1805569 to your computer and use it in GitHub Desktop.
Save leejarvis/1805569 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use Data::Dumper;
my $opts = Slop->new();
$opts->on('v', 'version', sub { print 'version 1.0.0'});
$opts->on('n=', 'name=', 'Your name');
$opts->parse(@ARGV);
print Dumper($opts->name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment