Finding perl files without documentation


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Finding perl files without documentation
# 1  
Old 07-27-2010
Finding perl files without documentation

I have an application consisting of a number of perl files. I want to find those perl files that have no documentation yet, so I tried the following from the root level of the directory where the application resides:
Code:
perldoc -r *

The output is something like the following:
Code:
No documentation found for "Build.PL".
No documentation found for "CHANGES".
...etc...

then the output stops at a file which apparently does have perl documentation:
Code:
Perldoc is only really meant for reading one document at a time.

How do I make the script continue? Then afterwards, I can do the following for those files that dont have documentation:
Code:
grep "No documentation found for"


Last edited by figaro; 07-27-2010 at 03:30 PM.. Reason: removed typo
# 2  
Old 07-27-2010
How about a for loop ? Something like

Code:
$ for f in *; do perldoc $f; done

OR

Code:
$ find . -type f | xargs perldoc

# 3  
Old 07-27-2010
Thanks for your response. The basic error still occurs though, which is:
Code:
Perldoc is only really meant for reading one document at a time.
So these parameters are being ignored:[list of files that have been ignored]

Of course I would have to do some filtering to only pick out the .pl and .pm files. The essence is that the loop should not abort, but how to do that?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Finding Files with Perl on a Hidden Dir?

Greetings! Been a while since I futzed around with Perl, and came upon a minor headscratcher for the community ;) Here's the basic code which I'm trying to make tick over:#!/usr/bin/perl use strict; use warnings; use diagnostics; print " starting "; while (-e "~/.somedir/testFile")... (9 Replies)
Discussion started by: LinQ
9 Replies

2. Shell Programming and Scripting

Perl script for finding directories with mtime

Need assistance in the perl script . Below script gives me the results of all the files and directories with mtime with no issues . But i wanted to have a file and specify all the directory locations and use that file as reference and get results . Any ideas are highly Appreciated . ... (6 Replies)
Discussion started by: ajayram_arya
6 Replies

3. Shell Programming and Scripting

Finding unique values in a hash (Perl)

Hi, I have a hash with unique keys associated with some data. my %FINALcontigs = ( 'mira_rep_c765:119reads**', 'ctctactggaagactgac', 'mira_rep_c7454:54reads**', 'atggatactgcgctgttgctaactactgga', 'mira_rep_c6803:12reads**', 'atcgactggatgcagggttgtggtttcta', ... (2 Replies)
Discussion started by: jdilts
2 Replies

4. Shell Programming and Scripting

Finding files with wc -l results = 1 then moving the files to another folder

Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies

5. Shell Programming and Scripting

Perl: Finding next day

Hi All, I have date format like 09/10/2005(MM/DD/YYYY) format. Using this as input i want to get the next day. The ouput should be in MM/DD/YYYY). Please help me how to do it using perl. Example:: Input 09/10/2005 Output 09/11/2005 Thanks in advance!! Rgds, Giri. (7 Replies)
Discussion started by: girish.raos
7 Replies

6. Shell Programming and Scripting

Finding directory and sub-directories individual size in Perl

Hi, Can anyone redirect to an existing thread or provide some info on how to find the size of a directory and it's sub-directories using a single script ? I tried finding a similar thread but in vain. I'm a newbie and any help would be greatly appreciated. Thanks in advance. (3 Replies)
Discussion started by: ryder
3 Replies

7. Shell Programming and Scripting

Finding missing files that are named sequentially with Perl?

Hello I am new to Perl, in fact I am on chapter one of the book. :) However I am in need of a Perl Script faster than I can finish the book. Perhaps someone can help me with my immediate need while I read my book. I have a directory with hundreds of files that are all named like... (4 Replies)
Discussion started by: newftronics
4 Replies

8. Shell Programming and Scripting

Perl: finding pattern and substituting

In Perl, I know pattern matching is something like, $name =~ /xxxxxx/; If I find pattern matching using regular expression, how do I substitute it with real string? For example, I need to find pattern, /-\d\d\d\d/, which is something like "-2000", but those 4 digits can be any numbers. Now, I... (1 Reply)
Discussion started by: hkjang
1 Replies

9. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

10. Shell Programming and Scripting

finding duplicates with perl

I have a huge file (over 30mb) that I am processing through with perl. I am pulling out a list of filenames and placing it in an array called @reports. I am fine up till here. What I then want to do is go through the array and find any duplicates. If there is a duplicate, output it to the screen.... (3 Replies)
Discussion started by: dangral
3 Replies
Login or Register to Ask a Question