Skip to content

Instantly share code, notes, and snippets.

@TeddyDD
Created February 1, 2014 23:03
Show Gist options
  • Save TeddyDD/8760381 to your computer and use it in GitHub Desktop.
Save TeddyDD/8760381 to your computer and use it in GitHub Desktop.
Get currently runing script directory in Perl
use strict;
use warnings;
use File::Spec;
use File::Basename;
#return current scipt directory
sub get_current_dir {
my $dir = dirname(File::Spec->rel2abs(__FILE__));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment