Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: Mini-Tutorial: Working with Odd/Even Elements

by LanX (Sage)
on Jul 10, 2009 at 21:16 UTC ( #779049=note: print w/replies, xml ) Need Help??


in reply to Re^3: Mini-Tutorial: Working with Odd/Even Elements
in thread Mini-Tutorial: Working with Odd/Even Elements

The interesting thing to note is that I seem to get a magical localization of my variables.
that's the output I get
[A b] [C d] AC Now A b C d C d
"orig" and "value" are lost, so no "magical localization". but adding local
    local @{$pkg}{qw(a b)} = \(@_[0,1]);
produces
[A b] [C d] AC Now A b C d orig value

Cheers Rolf

UPDATE:This was perl, v5.10.0 built for i486-linux-gnu-thread-multi

Replies are listed 'Best First'.
Re^5: Mini-Tutorial: Working with Odd/Even Elements
by Roy Johnson (Monsignor) on Jul 10, 2009 at 23:37 UTC
    That's what I would have expected. Thanks for the data point. I was wondering whether there was some obscure documented reason it should behave as I was seeing.

    Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://779049]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2021-10-21 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (83 votes). Check out past polls.

    Notices?