in reply to XML::Twig Sample programme error

You did not install XML::Twig properly, see A Guide To Installing Modules
$ cat Snafu.pm package Snacks; 1; $ perl -e " use Snafu; Snafu->new " Can't locate object method "new" via package "Snafu" (perhaps you forg +ot to load "Snafu"?) at -e line 1.