#!/usr/bin/perl5.005 use strict; use re 'eval'; for (("a", "b", "c")) { m# (\w) (?{ print $1 }) #ox; print "\n---\n"; } #### --- b --- c ---