diff --git a/perl-xCAT/xCAT/NodeRange.pm b/perl-xCAT/xCAT/NodeRange.pm index 78719d536..dd17c1dfe 100644 --- a/perl-xCAT/xCAT/NodeRange.pm +++ b/perl-xCAT/xCAT/NodeRange.pm @@ -136,10 +136,11 @@ sub nodesbycriteria { } if ($tab eq "nodelist") { #fun caching interaction my $neednewcache=0; - foreach (@cols) { - unless (grep /^$_\z/,@cachedcolumns) { + my $nlcol; + foreach $nlcol (@cols) { + unless (grep /^$nlcol\z/,@cachedcolumns) { $neednewcache=1; - push @cachedcolumns,$_; + push @cachedcolumns,$nlcol; } } if ($neednewcache) {