Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Finding files relative to a module

by wind (Priest)
on May 16, 2011 at 20:30 UTC ( #905147=note: print w/replies, xml ) Need Help??

in reply to Finding files relative to a module

GrandFather already explained why your code was not doing what you thought it was.

Here's an additional solution for achieving what you want though:

use Cwd qw(abs_path); use File::Basename qw(dirname); my $dirname = dirname(__FILE__); my $db_dir_qfn = abs_path("$dirname/../db"); print "$db_dir_qfn\n";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://905147]
[stonecolddevin]: good morning all
[holli]: I'd bring wine but I am dry since two years, so cookies must do
[1nickt]: james28909 I enjoyed your metaphysical wonderings in tghe scientist thread. Also thought your comment about baby crispr students was comment of the year.
Eily brings the milk

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2017-12-13 17:51 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (373 votes). Check out past polls.