#! /usr/bin/perl use strict; use warnings; my @other_stuff = ("run", "running", "runs", "runt", "I run a mile per day.", "Run, rabbit, run!", "One mile per day is easily runnable"); for my $element(@other_stuff) { print $element ."\n"; } print "-" x20 . "\n"; my @stuff = grep /\brun\b/x, @other_stuff; for (@stuff) { print $_ . "\n"; }