Hi
i want to fill %positon by range of keys and values ,like this !!!!! that make keys in range of @ks and any keys have 2 values in range of $xpoints and $ypoints !!!!!
use warnings ;
use strict ;
print 'Last X Point' , "\n" ;
my $xpoints = chomp (<STDIN>) ;
print 'Last Y Point' , "\n" ;
my $ypoints = chomp (<STDIN>) ;
my @xp = ("0" .. $xpoints) ;
my @yp = ("0" .. $ypoints) ;
my @ks = ("1" .. ((xpoints*$ypoints))) ;
my %position = (
'a' => [0,0] ,
'b' => [1,0] ,
'c' => [2,0] ,
'd' => [3,0] ,
'e' => [0,1] ,
'f' => [1,1] ,
'g' => [2,1] ,
'h' => [3,1] ,
'i' => [0,2] ,
'k' => [1,2] ,
'l' => [2,2] ,
'm' => [3,2] ,
'n' => [0,3] ,
'o' => [1,3] ,
'p' => [2,3] ,
'q' => [3,3] ,
) ;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.