in reply to XML::Twig Help

$t->parsefile('$file');
Another issue is that single quotes create a literal string. You are passing the string $file to the function, instead of the contents of the $file variable. You really want:
$t->parsefile($file);