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.
In reply to Re: passing variables from user defined function when use strict
by akho
in thread passing variables from user defined function when use strict
by onegative
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |