in reply to passing variables from user defined function when use strict
my @db = get_all_records(); my $count = 1; foreach my $item (my @db){ print "Record #$count: $item\n"; $count++; }
The @db inside the function and @db outside it are different and actually not related.
|
|---|