Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Get an input file and print multiple output files after performing operations on array.by Ganesh Bharadwaj1 (Sexton) |
on Dec 29, 2015 at 02:19 UTC ( [id://1151303]=perlquestion: print w/replies, xml ) | Need Help?? |
Ganesh Bharadwaj1 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
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.
Back to
Seekers of Perl Wisdom
|
|