use mypack; require /somepath/myperlscript.pl; my $x= new mypack(); print $x->get_y();