in reply to Re^3: XP and slashes?
in thread XP and slashes?
Hmmm... I didn't try that... what worked for me is the somewhat more cumbersome:
Since the .pm requires the other file it can be found in the %INC hash and the rest follows from that. I'll take a look at your approach since it is more concise than mine.my $db_path = ''; for (keys %INC) { if (/parse/i) { $db_path = $INC{$_}; $db_path =~ s/parse\.pm$/db\//i; last; } }
--hsm
"Never try to teach a pig to sing...it wastes your time and it annoys the pig."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: XP and slashes?
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 |
In Section
Seekers of Perl Wisdom