list is a hash array. Debug shows
Code:
$list = {
"seconds" => "12,2",
"hour" => "8,2",
"minute" => "10,2",
"month" => "4,2",
"day" => "6,2",
"year" => "0,4"
};
Code:
use Class::Struct;
struct ftpdata => {
mask => '$',
maskDate => '$',
list => '%',
fileInput => '$'
};
sub Load
{
my $f = ftpdata->new();
$f->list("year","0,4");
$f->list("month","4,2");
$f->list("day","6,2");
$f->list("hour","8,2");
$f->list("minute","10,2");
$f->list("seconds","12,2");
}
#####################################################
# Purpose: Method to translate input according to mask
#####################################################
#
sub translate
{
my $list = $f->list;
my $key;
my $value;
[b] bombs here what is the each(???) to get at list[/b]
while (($key,$value) = each($list))
{
print $key . "-" . $value;
}
}