poj#!perl use warnings; use strict; print 'Last X Point > '; chomp(my $xpoints = <STDIN>); print 'Last Y Point > '; chomp(my $ypoints = <STDIN>); #print "X=$xpoints Y=$ypoints\n"; my %position = (); my $key = 'a'; for my $y (0..$ypoints){ for my $x (0..$xpoints){ $position{$key++} = [$x,$y]; } } use Data::Dump 'pp'; pp \%position;
In reply to Re: Make a hash by a range of keys and values
by poj
in thread Make a hash by a range of keys and values
by GHMON
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |