On Mon, Nov 26, 2001 at 02:03:49PM -0500, Greg London wrote:
> What kind of overhead is associated with 
> a soft reference versus a hard code reference?
> 
> 
> I think that's what it's called.
> a scalar contains a string that is the
> name of the subroutine. I use the
> scalar to call the subroutine by name.
> 
>   my $scalar = 'my_sub';
>   $scalar();
> 
> That's a soft reference, right?

They are more often called symbolic references because making a symbolic table
causes a symbol table lookup. If you used a hard reference,

my $scalar = \&my_sub;
$scalar->();

then the symbol table lookup doesn't occur. 

-- 
Jason

Reply via email to