what is *varAliasA type glob.
Why when I made a little test of this could, I could get it to compile and run but no value was assigned to $reftype.Do you have references in your package? It works for me:
Note that looping over the entries in a stash will not find any lexical variables.#!/usr/bin/perl use warnings; $main::foo = []; while ((my $varname, my $globvalue) = each %main::){ local *varAlias = $globvalue; my $reftype = ref $varAlias; print "$varname = $reftype\n" if $reftype; } __END__ Name "main::foo" used only once: possible typo at /tmp/try line 5. foo = ARRAY
Would not compile with strict in use.That's because you never introduced $varAlias. Either use:
orour $varAlias = $globvalue;
use vars qw /*varAlias/;
Abigail
In reply to Re: Declareing something with a *
by Abigail-II
in thread Declareing something with a *
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |