in reply to Adding to @INC

> use lib dirname($0) ;

whats wrong with use lib '.'; ?

> At one site this gave a path with backwards leaning slashes like \\aaa\bbb\ccc

Windows?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: Adding to @INC
by bliako (Abbot) on May 21, 2019 at 14:55 UTC
     use lib dirname($0) ;
    
    whats wrong with use lib '.'; ?
    
    

    I guess the first adds to @INC the dir the script lives in and the second adds to @INC the dir the script was called from, i.e. user's current dir.

      yeah but that's what he wanted, right?

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        directory from which the application has been started
        to add the application directory.

        possibly... Though my comment was not really directed to you but to the author to clarify what is really needed.