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); }
In reply to Re^3: passing reference to subroutine
by GrandFather
in thread passing reference to subroutine
by asthaonard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |