in reply to How to determine absolute path of current Perl file?
Hi hakonhagland,
I use the following in scripts that I write on one system to run on another:
(note that realpath() is just an alias for abs_path())use Cwd qw/ realpath /; my $path = realpath($0);
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to determine absolute path of current Perl file?
by hakonhagland (Scribe) on Feb 29, 2016 at 12:38 UTC | |
by Discipulus (Canon) on Feb 29, 2016 at 12:52 UTC | |
by RonW (Parson) on Feb 29, 2016 at 21:11 UTC | |
by Discipulus (Canon) on Feb 29, 2016 at 22:51 UTC | |
by Corion (Patriarch) on Feb 29, 2016 at 12:39 UTC | |
by FreeBeerReekingMonk (Deacon) on Feb 29, 2016 at 21:42 UTC |