Does this do what you want?
$ cat /tmp/foo/mydir.pl #!/usr/bin/env perl use strict; use warnings; use Path::Tiny; my $path = path ($0); my $dir = $path->parent->stringify; print "\$0: $0\n"; print "Path::Tiny: $dir\n"; $ ls -l /tmp/foo lrwxrwxrwx. 1 user users 3 Mar 8 13:47 /tmp/foo -> bar $ /tmp/foo/mydir.pl $0: /tmp/foo/mydir.pl Path::Tiny: /tmp/foo $
🦛
In reply to Re: Getting logical path from Perl?
by hippo
in thread Getting logical path from Perl?
by mathomp4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |