in reply to searching a string in many files

You can do this simply and compactly with File::Find::Rule
use File::Find::Rule; my @files = find( file => name => 'kn', grep => qr/10450676/, in => [ glob('nc05*/') ] );
Check out the File::Find::Rule docs for more info on this fantabulous module.
HTH

_________
broquaint