Why don't you pass the parameters as references.....
They work like pointers in C kindof.

Why do you want to reference your subroutine?

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, July 26, 2005 2:19 AM
> To: $Bill Luebkert
> Cc: perl-win32-users@listserv.ActiveState.com
> Subject: Re: references 
> 
> 
> hello again,
> 
> > > hello all,
> > > 
> > > here is a ref/deref problem
> > > 
> > > I need to take a socket handle, convert it to a socket 
> ref, then a 
> > > scaler
> > > string 
> > > 
> > > A bit later in the same script, I need to take that scaler string 
> > > and turn
> > it
> > > back to a socket ref, and deref it back to the socket handle.
> > 
> > Maybe instead of asking for the way to implement your solution, you 
> > should describe the complete problem and see if we can come 
> up with an 
> > alternate solution that is a little less convoluted.  :)
> 
> let me clarify my problem.
> 
> I have a reference of a subroutine.
> 
> eg.
> 
> $sub = "test";
> 
> ..deref and execute
> 
> &$sub;
> 
> ...
> 
> sub test {
> my ($sockethandle,$blah...) = @_;
> ..do something
> }
> ........
> 
> in order to pass the paramenters, i decided to do this : 
> 
> sub main {
> 
> my $sub = "test|$sockethandle";
> ($sub,@_) = split(/\|/,$sub);
> 
> $⊂
> }
> 
> 
> if this is to work correctly, I need to take a socket handle, 
> convert it to a 
> socket ref, then a scaler, so i can pass it as a parameter. 
> in order to use the 
> socket later, i have to take the scaler, convert it to the 
> socket ref, then 
> dereference it.
> 
> Is there an easier way to pass parameters with a subroutine 
> reference? 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Perl-Win32-Users mailing list 
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to