Thousands thanks!! That exactly what I am look for ! =))

----- Original Message ----- 
From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]>
To: "LI NGOK LAM" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, July 27, 2003 3:40 AM
Subject: Re: How to pass CODE reference in hash?


>
> >sub tell_error
> >{ print "Error for @_" }
>
> >Check_err ( TYPE => [1, 1, \&tell_error('Type')], DATA => [ 1, 2,
> >\&tell_error ('Data')] );
>
> You can't take a reference to a function WITH ARGUMENTS.  You must either
> do
>
>   foo => \&function
>
> or
>
>   foo => sub { function(args) }
>
> Since you want to pass arguments, I'd say the second option is what you
> want.
>
> -- 
> Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
> <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
> [  I'm looking for programming work.  If you like my work, let me know.  ]
>
>



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

Reply via email to