I have a bunch of files in the form below and I want to go through the list and extract only the file name. The only way I can consistently see this is to take the next line after the ")." ahmad73 ______ exist: 0 K. Ahmad and I. J. Smalley, Powder Technol. 8, 69 (1973). Observation of particle segregation in vibrated granular systems . keywords: segregation vibration ahn91 ______ exist: 0 H. Ahn, C. E. Brennen, and R. H. Sabersky, J. Appl. Mech. 58, 792 (1991). Observation of particle segregation in vibrated granular systems . ahn92 ______ exist: 0 H. Ahn, C. E. Brennen, and R. H. Sabersky, J. Appl. Mech. 59, 109 (1992). Analysis of the fully developed chute flow of granular materials . I tried the following: # NOT WORKING open(LL,$ARGV[0]) || die "can't open $ARGV for reading: $!"; # input file open(LOGFILE,">$ARGV[1]") || die "can't open output file $ARGV[1]"; #output file while(my $line = <LL>) { next if $line =~ /^\s*$/; if ($line =~ /\)\.\s*$/) { # attempt to match on .) at end of line $myTitle = <>; print LOGFILE $myTitle; } } This is returning all files as if the regex were continually true . . . any body with a sharp eye
Wade through a file and grab titles
Booher Timothy B 1stLt AFRL/MNAC Fri, 01 Feb 2002 11:21:18 -0800
- RE: Wade through a file and grab titles Booher Timothy B 1stLt AFRL/MNAC
- RE: Wade through a file and grab tit... Bob Showalter
- RE: Wade through a file and grab tit... Timothy Johnson