Add the sub to your code thusly:
| in your while loop invoke: process_file($tmp_dir,$file); | and then after your loop sub process_file { my($path,$node)=@_; my $fname = $path . '\' . $node; open FIN,"<$fname" or die "$fname:$!"; while (my $line=<FIN>){ chomp $line; | do something here. } }
In reply to Re^3: Open a folder
by blue_cowdawg
in thread Open a folder
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |