Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Map coordinates?

by pme (Prior)
on Sep 02, 2019 at 17:47 UTC ( #11105458=note: print w/replies, xml ) Need Help??


in reply to Map coordinates?

Hi AM,
use strict; use warnings; use Data::Dumper; my @t = map {$_ * ($_+ ($_- 1) ) % 4} (2, 3, 4); print '@t: ', Dumper(\@t), "\n"; # 2 3 0 my $i = chr(0x34); # '4' print "\$i: $i\n"; my $five = chr(55); # '7' print "\$five: $five\n"; print "$i$five " . ($t[0] + $t[1]) . ($i / 2) . "." . $t[0] . chr(0x35 +) . ($t[0] * 3 + 1) . "\n"; my @x = map { (srand(1) * $_) % 9 } (28, 34, 57); print '@x: ', Dumper(\@x), "\n"; # 1 7 3 print $x[0] . ($x[0] * 2) . ($x[0] * 2 * 2 / 2) . " " . chr(48) . ($x[ +2] * 3) . "." . ($x[2] + 1) . chr(0x30) . (($x[1] % 4) - 3) . "\n";
The output for me is
47 52.257 122 09.400
HTH

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2019-11-11 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (64 votes). Check out past polls.

    Notices?