kellypayton
MIS
Hey again,
ive got one more thing i desperatly need help with. I want to read a txt file and output it line by line. ive looked all over the net and read lord knows how many tutorials but i cant do it :'(..im stupid hehe.
this writes to the file:
&send_error("We were unable to write to the file.") unless (open GFILE, ">>$config{'basepath'}/games/games.txt");
print GFILE "$form{'GAMETITLE'}\n";
close GFILE;
I use the "\n" to print the info into the txt file line by line.
This is what i use to output it:
my $gamelist;
open(GFILE,"<$config{'basepath'}/games/games.txt");
($gamelist) = <GFILE>;
chomp($gamelist);
close(GFILE);
I need the code above to read to txt file line by line but i cant do it, can someone write it for me so it does this?? pwetty pwease .
if I dont use the "\n" when printing to the file it works great but i want it to print line by line so its easier to find data and remove it. its just the output im having major problems with.
ive got one more thing i desperatly need help with. I want to read a txt file and output it line by line. ive looked all over the net and read lord knows how many tutorials but i cant do it :'(..im stupid hehe.
this writes to the file:
&send_error("We were unable to write to the file.") unless (open GFILE, ">>$config{'basepath'}/games/games.txt");
print GFILE "$form{'GAMETITLE'}\n";
close GFILE;
I use the "\n" to print the info into the txt file line by line.
This is what i use to output it:
my $gamelist;
open(GFILE,"<$config{'basepath'}/games/games.txt");
($gamelist) = <GFILE>;
chomp($gamelist);
close(GFILE);
I need the code above to read to txt file line by line but i cant do it, can someone write it for me so it does this?? pwetty pwease .
if I dont use the "\n" when printing to the file it works great but i want it to print line by line so its easier to find data and remove it. its just the output im having major problems with.