asak
1
Hi,
I have to redirect output of the command "perldoc perllocal" to new file which
contains all the perl module installed.
Currently using
perldoc perllocal >> mod_data
This does not contain all perl modules installed locally on machine, and each character is doubled.
Please help me out to list all perl modules installed in machine , using perl script.
Thanks,
asak
Aia
2
Please, try:
perldoc -otext -d mod_data perllocal
If that does work, try your luck with brute force:
perl -MFile::Find=find -MFile::Spec::Functions -le 'find { wanted => sub { print canonpath $_ if /\.pm$/ }, no_chdir => 1 }, @INC' > mod_data
Note: There is no need for a >>
unless there's content in mod_data
you do not want to overwrite.
asak
3
Thanks, but when i tried - i am getting permission issue. can you please help
[root@scsos0001413001 ~]# perldoc -otext -d mod_data perllocal
Can't write-open mod_data: Permission denied at /opt/lib/perl5/5.14.0/Pod/Perldoc.pm line 1597.
Aia
4
You need to find out why it can not create the file mod_data
in the directory that you are executing the command perldoc