in reply to Re: Grep fail condition
in thread Grep fail condition

next if scalar grep( /^$k$/, @aFiles);

if already imposes scalar context on its operand.