Front page | perl.perl6.language |
Postings from September 2001
RE: What's up with %MY?
Thread Previous
|
Thread Next
From:
Garrett Goebel
Date:
September 6, 2001 07:41
Subject:
RE: What's up with %MY?
Message ID:
71BEC0D4E1DED3118F7A009027B12028010BE022@EXCH_MISSION
From: Dave Mitchell [mailto:davem@fdgroup.co.uk]
> "Bryan C. Warnock" <bwarnock@capita.com> mused:
> > Consider it like, oh, PATH and executables:
> > `perl` will search PATH and execute the first perl
> > found, but 'rm perl' will not. It would only remove
> > a perl in my current scope..., er, directory.
>
> But surely %MY:: allows you to access/manipulate
> variables that are in scope, not just variables are
> defined in the current scope, ie
>
> my $x = 100;
> {
> print $MY::{'$x'};
> }
>
> I would expect that to print 100, not 'undef'. Are your
> expectations different?
Hmm, shouldn't that print something like SCALAR(0x1b9289c)?
If you meant ${$MY::{'$x'}} then I'd agree...
Thread Previous
|
Thread Next