On Mon, Oct 22, 2001 at 10:46:04PM +0800, Stas Bekman wrote:
> 
> It works for me:
> 
> my $package = << 'END';
> package Foo ;
> 
>     enter:
>         print "entered\n" ;
> 
>     sub handler { goto enter }
> 
>     1 ;
> END
> 
> eval $package;
> Foo::handler;
> 
> prints:
> 
> entered

It should print "entered\n" twice, once when eval()ed, and a second time
when handler() is called.  But you're not calling handler() a second
time, you've got a bearword "Foo::handler" there, not a sub call.  Try
adding some parens:

   Foo::Handler();

- Barrie

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to