« March 2009 »
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
You are not logged in. Log in
Entries by Topic
All topics  «
Blog Tools
Edit your Blog
Build a Blog
RSS Feed
View Profile
Perlblog
Saturday, 28 March 2009
perl environment

1): which perl
/usr/bin/perl

2): which perl version
perl -v
perl -version

3): which perl path
PERL5LIB=c:\perl\lib;c:\perl\site\lib
perl -e 'print join "\n", @INC'
perl -e 'print "\@INC is @INC\n";'

# add a search path for perl lib
{push @INC, "/tmp"}

#use lib "/tmp";


4): where is the perl module
4a): perl -MDBD::Oracle -e 'print $INC{"DBD/Oracle.pm"}, "\n"'

perl -MDBI -e 'print $INC{"DBI.pm"}, "\n"'
perl -MTerm::ReadKey -e 'print $INC{"Term/ReadKey.pm"}, "\n"'

4b): which perl module is installed
find . -name ReadKey.pm -exec ls -l {} \;

./perl5/site_perl/5.8.0/sun4-solaris/Term/ReadKey.pm

# for each perl module, find its pm file
find . -name "*.pm" -print
find . -name "*.pm" -exec ls -l { } \;
find . -name "*.pm" -print|xargs ls -l
find . -name "*.pm" |xargs ls -l

-- ------------------------------

# perl DBI version
perl -MDBI -e 'DBI->installed_versions;'
perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
perl -MDBD::Oracle -e 'print $INC{"DBD/Oracle.pm"}, "\n"'

 


Posted by shenh at 12:31 AM EDT

View Latest Entries