Skip to content

Instantly share code, notes, and snippets.

@kazeburo
Created August 13, 2012 04:31
Show Gist options
  • Select an option

  • Save kazeburo/3336988 to your computer and use it in GitHub Desktop.

Select an option

Save kazeburo/3336988 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use File::Zglob;
use Getopt::Long;
use Pod::Usage;
our $VERSION=$File::Zglob::VERSION;
GetOptions (
'h|help' => \my $help,
'v|version' => \my $version,
) or pod2usage(2);
$version and do { print "zglob: $VERSION\n"; exit 0 };
pod2usage(1) if $help;
my @args = @ARGV;
pod2usage(2) unless $args[0];
print $_,"\n" for zglob($args[0]);
__END__
=head1 NAME
zglob - extended globs
=head1 SYNOPSIS
zglob ([options] --) pattern
Options:
-help -h brief help message
=head1 AUTHOR
Tokuhiro Matsuno
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment