in reply to getting at the text of an icon
However, you'll notice that $variable_zero doesn't show up in the list. That's because 'my'ed variables don't actually appear in the symbol table, so only global (and 'local') variables are listed. My guess is that it would be virtually impossible to get at the 'my' (lexical) variables (but we've got some pretty smart monks here). :-)#!/usr/bin/perl package symTest; my $variable_zero = 0; $variable_one = 1; $variable_two = "blue"; $variable_three = 3; for (sort keys %symTest::) { print $_, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Getting at lexicals
by robin (Chaplain) on Dec 13, 2001 at 20:55 UTC |