this is my current code
-----------------------------------------
#!/usr/bin/perl
use CGI qw
standard);
print "Content-type: text/html\n\n";
$HTML = "message.htm";
open (HTML) or die "Can't open the file!";
print <HTML>;
close (HTML);
my $file = "productselection.txt";
open( LOG, "$file" ) or die "Cannot open file $!";
my $cnt = <LOG>;
close(LOG);
++$cnt;
open( LOG, "> $file" ) or die "Cannot open file $!";
print LOG $cnt;
close(LOG);
---------------------------------------
The counter goes work fine. But i want to add this code in also so go beside the counter number.
---------------------------------------
open(FILE,">productselection.txt");
flock(FILE,$exclusive_lock);
print FILE param("Input10");
print FILE param("Input11");
print FILE param("Input12");
print FILE param("Input13");
flock(FILE,$unlock_lock);
close(FILE);
----------------------------------------
now everytime i add this code ... instead of the input # going beside the counter ... they overwrite the counter.
i tried using arrays but i just couldnt get it to work.
... please help ... kinda urgent.
-----------------------------------------
#!/usr/bin/perl
use CGI qw
print "Content-type: text/html\n\n";
$HTML = "message.htm";
open (HTML) or die "Can't open the file!";
print <HTML>;
close (HTML);
my $file = "productselection.txt";
open( LOG, "$file" ) or die "Cannot open file $!";
my $cnt = <LOG>;
close(LOG);
++$cnt;
open( LOG, "> $file" ) or die "Cannot open file $!";
print LOG $cnt;
close(LOG);
---------------------------------------
The counter goes work fine. But i want to add this code in also so go beside the counter number.
---------------------------------------
open(FILE,">productselection.txt");
flock(FILE,$exclusive_lock);
print FILE param("Input10");
print FILE param("Input11");
print FILE param("Input12");
print FILE param("Input13");
flock(FILE,$unlock_lock);
close(FILE);
----------------------------------------
now everytime i add this code ... instead of the input # going beside the counter ... they overwrite the counter.
i tried using arrays but i just couldnt get it to work.
... please help ... kinda urgent.