Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Storing variable coordinates in a matrix

by Fletch (Chancellor)
on Mar 15, 2007 at 16:37 UTC ( #605016=note: print w/replies, xml ) Need Help??


in reply to Storing variable coordinates in a matrix

Aside from a few extra parens, your problem is that you're storing the value in $x and $y as it is at the time @A is initialized. In order to get close to doing what you want you'd need to store references to $x and $y, but that won't let you store (say) $y+1 and you'd have an additional layer of dereferencing to get the values out.

The best compromise would be to make a sub which returns a new set of coords given a new $x and $y.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2022-01-26 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (69 votes). Check out past polls.

    Notices?