while (/^$att:\s*(.*)$/img) { my $val = $1; print "$att is '$val'\n"; }