in reply to Re: Array element getting deleted
in thread Array element getting deleted
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.
|
|---|