Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://905147]
help
Chatterbox?
[moritz]: good morning
[moritz]: perl -MNetAddr::IP -wE 'say NetAddr::IP->new( "2001:780:233::/ 64")->hostenum' dies with netmask error: overrange or spurious bits at -e line 1.
[moritz]: any idea what's wrong?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-04-25 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.