in reply to Re^2: passing reference to subroutine
in thread passing reference to subroutine
What do you really want to do? The dereference is as simple as undef @$ref; (see below for the entire updated sub), but I have the strong feeling that you are asking the wrong question and providing the wrong sample code. It seems extraordinary that you would call a sub just to clear an array!
sub undef_ref { my $ref = shift; undef @$ref; print '=' x 20; print "\n"; print Dumper (@$ref); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: passing reference to subroutine
by asthaonard (Acolyte) on Oct 28, 2011 at 08:54 UTC |