Skip to content

Instantly share code, notes, and snippets.

@wakaba
Created June 25, 2012 02:02
Show Gist options
  • Save wakaba/2985990 to your computer and use it in GitHub Desktop.
Save wakaba/2985990 to your computer and use it in GitHub Desktop.
Perl script template
#!/usr/bin/perl
use strict;
BEGIN {
my $file_name = __FILE__;
$file_name =~ s{[^/\\]+$}{};
$file_name ||= '.';
$file_name .= '/../config/perl/libs.txt';
open my $file, '<', $file_name or die "$0: $file_name: $!";
unshift @INC, split /:/, scalar <$file>;
}
use warnings;
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment