rename 'my $a=$_ ; open XML, "$a.xml"; while (my $l=) { if ($l =~ /(.+?)<\/rdf:li>/) { $a=$1} } ; close XML; $_=$a' *