I am still considering your first question, but as a comment to your 2nd question:
2. As the input.csv files are sent to me with different filenames each day, I am renaming these to input.csv for processing by the perl inputfilescript.pl script file. I would like to have the function of the inputfilescript.pl file asking me to type the filenames for the INPUT.csv file name and an OUTPUT.csv so that I do not have to rename filenames for processing.
One very common way to deal with this is to have "inputfilescript.pl" read from STDIN and write to STDOUT. Then you wind up with:
inputfilescript <infile.csv >outfile.csv
Use the file system to stuff an input file into the program and use the file system to create the output file. That way "inputfilescript.pl" doesn't need to be interactive with a user and this is easier to automate. It is of course also possible to have "inputputfilescript" accept 2 parameters on the command line, an infile name and an outfile name. Or perhaps just a single parameter of the infile.csv name and the program automatically creates an output.csv with a similar name. Lot's of possibilities.... Having "inputfilescript.pl" prompt the user (you) for file names in an interactive way is the last thing I would think of.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.