#!/usr/local/bin/perl -w use strict; # seed files for <> operator @ARGV = qw( /usr/dict/words ); while (<>) { # look for b e n(regardless of intervening characters) print if /a.*?b.*?o.*?r.*?t/; };