> -----Original Message-----
> From: Booher Timothy B 1stLt AFRL/MNAC
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 2:35 PM
> To: [EMAIL PROTECTED]
> Subject: Wade through a file and grab titles
>
>
> 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 = <>;
^^
This should be <LL>. If I make that change, the script runs fine for
me.
> print LOGFILE $myTitle; }
> }
>
> This is returning all files as if the regex were continually
> true . . . any
> body with a sharp eye
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]