Update sample.pl

adapted sample to module