http://www.perlmonks.org?node_id=1190638


in reply to Re^5: 'do' command is dead? Surely not?
in thread 'do' command is dead? Surely not?

AHHH!!! my $file='/home/andy/Desktop/test-response.pl'; works!!!! I'm assuming something happened in a recent update. Edit - './test-response.pl' works too. EDIT2 - use lib '.'; my $file='test-response.pl'; also works

(but, given that my Perl portfolio contains thousands of these, is there a way of telling Perl never to require the absolute path, other than use lib '.'? I think I now understand the importance of '.' in @INC, but soooooo many scripts to edit!)

Replies are listed 'Best First'.
Re^7: 'do' command is dead? Surely not?
by Corion (Patriarch) on May 19, 2017 at 17:13 UTC

    See perlrun on how to modify @INC globally via $ENV{PERL5LIB}.

    Personally, I would modify the scripts on an as-needed basis.