$dir = "/temp/"; opendir(DIR, $dir) or die "cannot open"; while (defined($file = readdir(DIR))){ open (F, $file) or die "cannot open file"; while (<F>){ print $_; } close F; } closedir(DIR);
In reply to File handling basics by ElectroRed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |