use mypack; require /somepath/myperlscript.pl; my $x= new mypack(); print $x->get_y(); #### my $y = &subroutinefrom_myperlscript(); $self->set_y($y);