how do I edit parameters to this perl script........ here is the senario, I just took a job for an IT company, and the previous guy had written some perl scripts for the company that run various functions... one of those functions is a perl script that reformats the name of some data in an excel sheet...
(my boss knows I don't know perl)
so basically i need to edit his script to include these 3 - 4 parameters...
1. Input .xls file path
2. Output .xls file path
3. Header Row - Row number which contains the actual headers such as "borrow" or "buyer". This is how the script knows which columns to split and fix the lowercase on.
4. Name Split Flag -- Optional, we pass a 1 if we need the Borrower/Buyer split into FirstName and LastName in separate columns.
Here is the snippet of code I think needs to be edited::
use strict;
use Spreadsheet::ParseExcel::S
aveParser;
&mymain();
sub mymain {
my($INPUT,$OUTPUT,$HEADER,
$NAMESPLIT
);
$INPUT = $ARGV[0];
$OUTPUT = $ARGV[1];
$HEADER = $ARGV[2] - 1;
$NAMESPLIT = $ARGV[3];
if ( ! -f $INPUT ) {
die("Missing input file $INPUT\n");
}
elsif ( -f $OUTPUT ) {
die("Output file $OUTPUT already exists\n");
}
elsif ( ! defined $HEADER ) {
die("Missing required header row number\n");
}
Start Free Trial