[CSC 330] Perl - Locating Binaries and Libraries
Andrew J. Pounds
pounds_aj at mercer.edu
Fri Oct 25 09:00:52 EDT 2024
So yesterday in class we had to include "use lib '.';" at the top of our
scripts to get them to run. This was a "hack" that was done because
Perl 5.26 removed the current directory from the list of places that are
searched for modules and executables. According to the perl
documentation I read the proper way to handle this in Perl 5.26 is to
include the following two lines in your script before you search for
files...
use FindBin qw($RealBin);
use lib $RealBin;
--
*Andrew J. Pounds, Ph.D.*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA, 31207 (478) 301-5627 /
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc330/attachments/20241025/e9e2a992/attachment.htm>
More information about the csc330
mailing list