Running Perl 5.x on Solaris 9 SPARC
No modules other than what comes with the basic perl installation are
available.

I have a file: file1.csv as such:
Day of the year, value
1,4144.34
2,4144.38
3,4144.38
4,4144.38
5,4144.44
6,4144.48
7,4144.48
8,4144.50
9,4144.50
10,4144.48
11,4144.50
12,4144.52
13,4144.52
14,4144.54
15,4144.54
16,4144.56
17,4144.58
18,4144.58
19,4144.60
20,4144.62
.....
365,4147.42
366,4147.56 (Leap Year)
....OR....
This may be (as shown below) between the current date and the last day
of the year or with missing data 
331,
332,
333,
...
365,
366, (Leap Year)
----------------------------------
I would like to create a new file: file2.csv based on the data in
file1
Days without values (missing data or future date) would be set as
null.
If this is run on November 2, 2007 then all days between November 3,
2007 and December 31, 2007 would have a date and a "null value" for
parameter value.

Passed in as commandline arguments
arg1 (ex: 201)
arg2 (ex: 11)
startdate (20070101) - January 1, 2007
The data would be incremented as per column one value of file1. 

Usage example:
#perl myscript 201, 11, 20070101

---------------------------------- 
The following are string constants
my $prefixdata = "prefix data (a.a";
my $datedata = "to_date(";
my $suffixdata = "'suffix data'));" 

$prefixdata, arg1, arg2, [parameter value from file1], $datedata [date
derived from file1 based on record number 1-365(6) in this format:
'2007/01/01' - date must be enclosed in single quotes] ,$suffixdata

prefix data (a.a, 201, 11, 0101.07, to_date('2007/01/01','suffix
data'));

Any help with this is greatly appreciated.

Thanks


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to