Thanks for your comments and yes I got your point, I know that undef $b will do, But I need to delete $b using $a, The typeglob itself need to be freed via $a without actually using $b. Have you got it now?."delete $b using $a" doesn't make much sense. Do you want to delete the reference $b (leaving the typeglob it refers to unchanged), or do you want to delete the typeglob itself?
You cant delete the typeglob while a reference to it still exists (from $a or $b). You can however make it undefined, (freeing up any IO handles etc attached to it) with the following:
undef *$a
Dave.
In reply to Re^3: How to remove the actual glob from a glob reference
by dave_the_m
in thread How to remove the actual glob from a glob reference
by targetsmart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |