#! /usr/bin/perl use warnings ; use strict ; print 'Last X Point' , "\n"; chomp( my $xpoints = ); print 'Last Y Point' , "\n"; chomp( my $ypoints = ); my %position; my $key = 'a'; for my $y (0 .. $ypoints) { for my $x (0 .. $xpoints) { $position{$key++} = [$x, $y]; } } for my $key ('a' .. $key) { print "'$key' => [$position{$key}[0],$position{$key}[1]],\n" if $position{$key}; }