raquelm has asked for the wisdom of the Perl Monks concerning the following question:
I have a text file in the following format:
sku, itemname, itemdescription, price
I want to read each line, then write the contents of the line to a new file that is named sku.html
So for the following example source file: 123, soap, dove, $1.99
I want to save that line to a file named 123.html
I have the basics of how to open and read a file, and how to write to a new file. I just can't figure out how to name the new files dynamically after the sku field. Any suggestions are greatly appreciated. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to a new file with a dynamically created name
by roboticus (Chancellor) on Feb 20, 2011 at 22:17 UTC | |
|
Re: Writing to a new file with a dynamically created name
by Monkomatic (Sexton) on Feb 21, 2011 at 00:22 UTC | |
by chromatic (Archbishop) on Feb 21, 2011 at 03:19 UTC |