in reply to Re^2: XP and slashes?
in thread XP and slashes?
Yes, the problem is something else... basically it is how to find a file relative to a .pm file
From within the module,
use Cwd qw( realpath ); use File::Basename qw( dirname ); use File::Spec::Functions qw( catdir ); my $module_dir_qfn = dirname(realpath(__FILE__)); my $db_dir_qfn = catdir($module_dir_qfn, 'db');
Update: Updated to use OP's dir name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XP and slashes?
by hsmyers (Canon) on Apr 05, 2009 at 07:42 UTC | |
by ikegami (Patriarch) on Apr 05, 2009 at 08:18 UTC | |
by hsmyers (Canon) on Apr 05, 2009 at 09:11 UTC | |
by hsmyers (Canon) on Apr 05, 2009 at 09:50 UTC | |
by ikegami (Patriarch) on Apr 05, 2009 at 22:21 UTC |