#!/usr/local/bin/perl -w use strict; open(INPUT, "data.txt") || die "Error opening 'keywd.txt'\n"; my @data = ; open(FH, '<', "keywd.txt") || die "Error opening 'data.txt'\n"; my @keywd = ; my $keywdnum = $#keywd; while (my $element = pop @data) { my $i = 0 ; chomp($element); while ($i <= $keywdnum-1) { my $tempwd = ""; $tempwd = $keywd[$i]; if ($element =~ m/$tempwd/i) { print $i; $i++; } else { $i++; } } } close INPUT; close FH; #### analysis data power seek true #### analysis analyzing applications co-principal completed computer computing consulting data