G
Gunnar Hjalmarsson
nicolas-laurent said:This script takes in1.txt, in2.txt in3.txt form the command line and
print this on the screen.
while (<>) {
for $a (split) {print "$a -- file $ARGV\n"}
}
result:
word -- file in1.txt
word --- file in1.txt
word -- file in2.txt
word -- file in2.txt
etc.
Question: How to generate output files for each input file that
contains the result of the script ?
out_in1.txt
word -- file in1.txt
word --- file in1.txt
out_in2.txt
word -- file in2.txt
word -- file in2.txt
What have you tried?
perldoc -f open