#!/usr/bin/perl # main program; use strict; use warnings; print "Enter the filename to be parsed\n"; my $file = ; open (DATA,$file); print "Enter the keyword to be searched in the file\n"; chomp(my $key = ); # Search for the key pattern in the file information. while (defined (my $line = )) { next if $line !~ /\b\Q$key\E\b/i; print "$line\n"; } print "Keyword not found\n"; #### Controller Version Information -------------------------------------------------------- BIOS : 0.2-0 (18298) Firmware : 0.2-0 (18298) Driver : 0.1-7 (28000) Boot Flash : 0.2-0 (18298) -------------------------------------------------------- Controller xyz Information -------------------------------------------------------- Status : xyz Optimal