FindBin
FindBin
is also part of Perl sinceperl 5.00307
.FindBin
locates the directory in which the running script is stored.
file: examples/010_findbin.pl 1: use FindBin; 2: print "$FindBin::Bin\n";
~/examples$ perl 010_findbin.pl /home/domm/perl/talks/using_use/examples
lib
we can solve the problem we had earlier.