S
Shalini Joshi
Hey.
The following is the logic-structure of the code I am attempting to
write:
if (today is the first of the month)
{
Read all files with name containing SYSMT03.xxxxx.txt
#x denotes arbitrary value
Each file contains information pertaining to a particular owner. So
I parse the data no1, y for each user . Now this entire data from all
these files is to be sorted on the basis of this no1. That is more
than one user can have the same value for no1.
#The question I ask at this point is, how would I go about doing this
in perl? #What data structure would I use given this ?
I have to sum the total of y(from various user files) for each no1. I
call this value BASE1
}
else if (today is not the first day of the week, then for each
remaining day(recurring calculations)
{
Read another set of files names containing SYSMT02Axxxx.txt
Again similar information. Now what I will do here is calculate the
change in BASE and add it to BASE1 to get at BASE2. SImilarly for the
remaining days.(eg BASE3= BASE2+change3)..
}
How will I be able to go about designing the data structures etc in
perl?
I would appreciate any tips/help/reading references...
I am getting stuck right in the beginning itself...where I try and
match the regular expressions:
I say :
open (ACCOUNT_POSITION, '/home/perlstuff' ) or die "Can't open file:
$!\n";
<ACCOUNT_POSITION> =~ /.+03\..{5}\.txt
It doesnt work for some reason although i have the said file in my
directory. Where am I going wrong on this one???
Thanka again for all the help in past and in advance for this one!
Regards
Shalini
The following is the logic-structure of the code I am attempting to
write:
if (today is the first of the month)
{
Read all files with name containing SYSMT03.xxxxx.txt
#x denotes arbitrary value
Each file contains information pertaining to a particular owner. So
I parse the data no1, y for each user . Now this entire data from all
these files is to be sorted on the basis of this no1. That is more
than one user can have the same value for no1.
#The question I ask at this point is, how would I go about doing this
in perl? #What data structure would I use given this ?
I have to sum the total of y(from various user files) for each no1. I
call this value BASE1
}
else if (today is not the first day of the week, then for each
remaining day(recurring calculations)
{
Read another set of files names containing SYSMT02Axxxx.txt
Again similar information. Now what I will do here is calculate the
change in BASE and add it to BASE1 to get at BASE2. SImilarly for the
remaining days.(eg BASE3= BASE2+change3)..
}
How will I be able to go about designing the data structures etc in
perl?
I would appreciate any tips/help/reading references...
I am getting stuck right in the beginning itself...where I try and
match the regular expressions:
I say :
open (ACCOUNT_POSITION, '/home/perlstuff' ) or die "Can't open file:
$!\n";
<ACCOUNT_POSITION> =~ /.+03\..{5}\.txt
It doesnt work for some reason although i have the said file in my
directory. Where am I going wrong on this one???
Thanka again for all the help in past and in advance for this one!
Regards
Shalini