in reply to Re: array assignment
in thread array assignment
Not real pretty, but I guess that's why Tye invented Mapcar, which, if I read the docs right, one could use to solve the problem thus:my ($dd, $mm, $yyyy) = map {(0,1,1900)[$_] + ((localtime)[3..5])[$_]} +0..2;
(no extra map needed, Dragonchild).my ($dd, $mm, $yyyy) = mapcar { $_[0] + $_[1] } [0,1,1900], [(localtim +e)[3..5]];
|
|---|