Seems a little long winded though... Is there a simpler answer?#!/usr/bin/perl use strict; use warnings; use Cwd 'abs_path'; my $script_dir = substr( abs_path($0), 0, rindex(abs_path($0),'/') ) print $script_dir.$/;
In reply to Determining the directory the running script is in by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |