Ganesh Bharadwaj1 has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get an input file and print multiple output files after performing operations on array.
by BrowserUk (Patriarch) on Dec 29, 2015 at 03:08 UTC | |
by Ganesh Bharadwaj1 (Sexton) on Dec 29, 2015 at 06:36 UTC | |
|
Re: Get an input file and print multiple output files after performing operations on array.
by Athanasius (Archbishop) on Dec 29, 2015 at 13:07 UTC |