#!/usr/bin/perl -w use strict; open (DICT ,"/usr/share/dict/linux.words") || die "can't read dictionary: $!\n"; while () { my @tab=split("\n",); for ( my $cnt = 0 ; $cnt < @tab ; $cnt++ ) { system ('gpg ~/file.gpg'); sleep (2); print $tab[$cnt], "\r"; #also tried 'system ($tab[$cnt])', no dice. } } close DICT;