sub rtdeposit { #Please see NOTE at the top of this file
open(WRITERT, ">rt.log") || die "Cannot open rt.log";
print "\nStarting Month:";
chomp($smon = <STDIN>);
print "\nStarting Day:";
chomp($sday = <STDIN>);
print "\nStarting Year (4 digit):";
chomp($syear = <STDIN>);
print "\nDuration in Days:";
chomp($dur = <STDIN>);
print "\nAmount to Add:";
chomp($add = <STDIN>);
print "\nDescription:";
chomp($desc = <STDIN>);
$sdate = Date_to_Days($syear,$smon,$sday);
print WRITERT "deposit\n$add\n$dur\n$desc\n$sdate";
reload();
}
This is a peice of some horrible code I wrote which I intend to fix (Im very much a newbie)
WRITERT writes to a file called rt.log, what stumps me is that t does not write all of the feilds in the file.
Can anybody tell me my mistake?
thanks