in reply to Re^2: How could you make a script think it's running in its own directory?
in thread How could you make a script think it's running in its own directory?

How does __FILE__ help? Would you use it with chdir?
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......
  • Comment on Re^3: How could you make a script think it's running in its own directory?

Replies are listed 'Best First'.
Re^4: How could you make a script think it's running in its own directory?
by parv (Parson) on Mar 27, 2008 at 10:48 UTC

    Just Try It ...

    use File::Basename qw/ fileparse /; print join "\n" , __FILE__ , ( fileparse __FILE__ )[1] ;