use warnings; use strict; my $x = "aiutino aiutino argh! aiutino"; my @matches = $x =~ / \b aiutino \b /gix; print "$_\n" for @matches;