Dan Coutu <[EMAIL PROTECTED]> writes: > Piece of cake. You need to use the FindBin module that is included in > the default Perl distribution. Do this: > > #!/usr/bin/perl > use FindBin qw($Bin); > use lib "$Bin"; > use myinclude; > > This assumes that your module is named myinclude.pm and is in the same > directory as your perl script.
I was just about to make this same recommendation. We've got hundreds of thousands of lines of perl code here at work, and this is where I first discovered the FindBin module. We use it extensively here, and probably wouldn't be able to do things nearly as easily without it. Almost every script we write has: use FindBin; use lib "/build/perl/lastrun/lib"; use lib "$FindBin::Bin/../../../perl/lib"; use lib $FindBin::Bin; It's really nice to not have to worry about your modules not being found :) -- Seeya, Paul _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss