Let us call the input file shouldIgo.txt. My input file looks like this.
Jakarta paris delhi singapore
hot cold wet
yes no cannotcomment
I want to generate multiple output files which have the information which says
output file 1 is
city: Jakarta
weather: hot
recommended? : yes
output file 2 will be
city: Jakarta
weather: hot
recommended? : no
and so on. City, weather and recommended are hard coded. totally there will be 4*3*3 files. containing all possible combinations. Each of these information needs to be stored in separate files. I think I need to use file handles and manipulate the array. I am not able to achieve the result. Any help on this direction will be helpful.
In reply to Get an input file and print multiple output files after performing operations on array. by Ganesh Bharadwaj1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |