[thelist] Perl references
Chris Marsh
chris at ecleanuk.com
Wed Feb 19 09:08:01 CST 2003
Dear all
I have a newbie Perl question that is driving me up the wall. I have the
following:
for ($i = 0; $i < @week; $i++) {
$week[$i]{DATE} = [ @date ];
&incrementDate(\@date, 1);
}
sub incrementDate {
my($date, $type) = @_;
$date[3]++;
return;
}
I want &incrementDate to reference original array @date and increment
index 3 for each pass of the loop, but I'm getting no errors but no
incrementing either. I suspect that it's my failure to grasp referencing
implementation in Perl, but I would appreciate *any* help here...
Many thanks.
Regards
Chris Marsh
More information about the thelist
mailing list