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."In reply to Re^4: XP and slashes?
by hsmyers
in thread XP and slashes?
by hsmyers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |