On Wed, Jul 18, 2001 at 09:56:14AM -0400, Greg London wrote:
> can someone explain somethig for me, please:

Sure, ...

> bless \ [@_], $package;
> question: what's the '\' character do?

It creates an anonymous scalar reference:

@_ = (6, 7, 8);
$aref = [@_];
$arefref = \ [@_];
print @$aref;       # prints "678"
$aref = $$arefref;
print @$aref;       # prints "678"

> $x = sub { $ {shift()} }   ;
> question: what's the lone '$' do?

It performs scalar dereference, just like the first '$' in
'$$arefref'.  In fact, '$$arefref' is shorthand for '$ {$arefref}' and
what's in the {} braces can be any expression that evaluates to a
scalar reference.  The space between '$' and '{' is ignored as
whitespace.

-John

> thanks,
> Greg
> 

-- 
John Tobey, late nite hacker <[EMAIL PROTECTED]>
 ``I just dont want to worry about my word processor dropping its core.
   It simply isnt my job to whip out GDB and debug my word processor.''
 -Emily K. Dresner-Thornber

Reply via email to