It's probably easiest to just do it in the Perl script, e.g.

#!perl -l
print '<flashlist>';
while (<>) {
    print '<listitem><flashtext>', $_, '</flashtext></listitem>';
}
print '</flashlist>';

or, if you want the placeholders,

#!perl -l
print '<${1:flashlist}>';
while (<>) {
    print '<${2:listitem}><${3:flashtext}>', $_, '</$3></$2>';
}
print '</$1>';


Robin