ORIGINAL_QUARTUS_VERSION a b c d LAST_QUARTUS_VERSION w x y z #### my $originalquartus; my $latestquartus; open( my $OFILE, $synthfilelist ) || die "couldnt open file: $!"; while ( my $readlineqo = <$OFILE> ) { chomp $readlineqo; if ( $readlineqo =~ /ORIGINAL_QUARTUS_VERSION/ ) { my @originalqarray = ( split / +/, $readlineqo ); $originalquartus = $originalqarray[3]; print "\nthe original quartus $originalquartus\n"; } if ( $readlineqo =~ /LAST_QUARTUS_VERSION/ ) { my @latestqarray = ( split / +/, $readlineqo ); $latestquartus = $latestqarray[3]; print "\nthe latest quartus $latestquartus\n"; } next if $readlineqo =~ /^ $/; } close($OFILE);