foreach(@files) {
print "The file is $_\n";
func();
}
use:
foreach my $q (@files) {
print "The file is $q\n";
func();
}
That way the variable is assigned to $q instead of $_ and you can do with it whatever you like.
In reply to Re^2: Array element getting deleted
by eelkonio
in thread Array element getting deleted
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |