#!/usr/local/bin/perl -w use strict; my @cut; my $cut; open (WORDS, 'data.txt') or die "Can't open employees2.txt: $!\n"; my @cols = qw('data.txt'); while (my $line = ) { chomp $line; my @words = split /\s+/, $line; $cut = pop(@words); chomp; next if !/a/; next if !/e/; next if !/i/; next if !/o/; next if !/u/; print $_ . "\n"; } }