1

Perl "require" question

view story
linux-howto

http://www.unix.com – So a script can tell where it's located by the $0 variable right? OK So what if another script calls "require" on it? Does calling $0 still refer to where it's located? Apparently not, it refers to the script that called require on it. So when that required script tries to call require on other scripts using relative paths, those requires fail if the requiring script is not found in the same directory. Is there a way to fix this? Thanks ---------- Post updated at 03:03 PM ---------- Previous update was at 12:26 PM ---------- Nevermind it looks like __FILE__ fixes my problem. (HowTos)