I am hoping some one can point me in the right direction.
I have a sub script that I have inculded below. In the script I have a foreach statement. The satement reads the array @data and displays each line. (That part works, cool!)
The part that I am having difficultlies with is also reading each line into a new varible. I could then edit the varible value .
$var1
$var2
etc
Any suggestion.
If I figure it out I will post back.
Thanks in advance
open(LOG,"< ./data/data.txt"
;
@date = <LOG>;
close(LOG);
print "Content-type: text/html\n\n";
$n=1;
print "<UL>Payroll Log File</UL>";
foreach $messages (@data) {
print "<LI>Line #$n was reported as :
$messages\n";
$n++;
}
-Danny
I have a sub script that I have inculded below. In the script I have a foreach statement. The satement reads the array @data and displays each line. (That part works, cool!)
The part that I am having difficultlies with is also reading each line into a new varible. I could then edit the varible value .
$var1
$var2
etc
Any suggestion.
If I figure it out I will post back.
Thanks in advance
open(LOG,"< ./data/data.txt"
@date = <LOG>;
close(LOG);
print "Content-type: text/html\n\n";
$n=1;
print "<UL>Payroll Log File</UL>";
foreach $messages (@data) {
print "<LI>Line #$n was reported as :
$messages\n";
$n++;
}
-Danny