in reply to Re^2: Undefined subroutine - newbie problem
in thread Undefined subroutine - newbie problem

require Foo; import Foo; should have roughly the same effect as use Foo.

Or better, BEGIN { require Foo; import Foo; } should have exactly the same effect as use Foo.

But other than as a lesson in how use works under the hood, I'm not sure why any exercise would insist that you employ require rather than trusty old use.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^4: Undefined subroutine - newbie problem
by blackhat (Novice) on Aug 14, 2012 at 12:32 UTC
    it seems that:
    require gts; import gts;
    which holds sub print_throws_simple still gives me: Undefined subroutine &main::generate_throws_simple called :(