in reply to Re^4: Lexical pad / attribute confusion
in thread Lexical pad / attribute confusion
my has both runtime and compile time effects, I wouldn't be suprised if they are on the same pad, but are removed from the padlist when the block is exited.#!/usr/bin/perl use warnings; use strict; INIT { use Data::Dumper; use PadWalker qw (peek_my peek_sub); print Dumper(peek_my(0)); } my $foo = 'lee'; my $bar = "Bar"; { my @foo = (1..3); } { my @bar = (9..12); } print Dumper(peek_my(0)) __END___ $VAR1 = {}; $VAR1 = { '$foo '$bar };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Lexical pad / attribute confusion
by adrianh (Chancellor) on Dec 22, 2002 at 01:19 UTC | |
by shotgunefx (Parson) on Dec 22, 2002 at 01:44 UTC | |
by adrianh (Chancellor) on Dec 22, 2002 at 11:26 UTC | |
by shotgunefx (Parson) on Dec 22, 2002 at 21:18 UTC |