I am working with 2D coordinates (actually representing cells in an Excel sheet) and need to add and subtract various offsets to get at the coordinates I need. Currently I am mainly using references to arrays to hold the coordinates, but I was wondering whether there was some clever perly way via which I would be able to do something like the obviously incorrect:
@origin = (2,3);
@offset = (4,5);
@interesting_cell = @origin + @offset; # = (4) not (6,8) Doh!
"It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ." (from "Slow Loris" by Alexis Deacon)