Core Function Ref
From Sputnik Wiki
Ref( $variable )
Contents |
Description
Retrieve the variable at the lowest depth in references that the current variable links to
Parameters
$variable
A variable to locate and return its ref.
(If the variable links to a ref that links to a ref that links to a ref it will return the last one it finds at the end of the chain assuming the chain does end... )
Return Value
None
Remarks
None.
Example
$a = qw(The quick brown fox); $b = &$a; println( isVarRef( $b ) ? "true" : "false" ); println( isVarRef( Ref($b) ) ? "true" : "false" );
The * operator can also be used as if Ref() was used example :
$a = qw(The quick brown fox); $b = &$a; println( isVarRef( $b ) ? "true" : "false" ); println( isVarRef( *$b ) ? "true" : "false" );