#! /usr/bin/perl use strict; use File::Find; my ( $filename, $revision, $date ); format STDOUT = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | @>>>>>>>>> | @>>>>>>>>>> $filename, $revision, $date . find( \&wanted, "." ); sub wanted { if( /[hc]$/ ) { open( FILE, $_ ) or do { warn "Could not open ".$_; return }; $date = "Not Found"; $revision = "Not Found"; while( my $line = ) { # This is the comment line I was after # * | A | 12.01.99 | developer@company.com | if( $line =~ /^\s*\*\s*\|\s*([A-Z])\s*\|\s*([^\s]+)/ ) { $revision = $1; $date = $2; } } $filename = $File::Find::name; write; close FILE; } }