I also tried withwhile( defined(my $filename = glob("*.txt"))){ open(WORDLIST,$filename) || die "can't open wordlist: $!";} init_words();
but am not able to access all the files with .txt extension in the same folder.. Also i want to print the name of the file from which i print some text... e.g. file1.txt hasopen(WORDLIST, *.txt>);
file2.txt hasline1 line2
I want to get print as:line3 line4
Thanking you,file1.txt line1 file2.txt line4
In reply to read multiple files by sharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |