PhoenixDown
Programmer
For my script control panel, I'm making the guestbook entries settings part and I'm having a little problem.
On my data file It prints a new line at the top. It looks like:
To call all the entries I use:
It converts the new line to table format and I've tried using that if statement to strip it out of there and it's not working.
Here is an image of what it looks like:
Please tell me what I'm doing wronf! Thank you! - Go there!
On my data file It prints a new line at the top. It looks like:
Code:
"
1|Calvin|<A HREF="mailto:calvin@puremadnezz.com">|<A HREF="[URL unfurl="true"]http://www.puremadnezz.com/">||12345678|xcloud0|xcloud2000x@hotmail.com|xcloud2000x|||||Test|06-22-2001|00:47:45|216.130.72.133|c-72-133-res1.mts.net"[/URL]
To call all the entries I use:
Code:
open(DATA,"<$vars_gen{'CGIPath'}/variables/vars_entries.cgi") or die ("Unable to open guestbook entry file.");
@line = <DATA>;
close(DATA);
foreach $line (@line) {
$line =~ s/\n//g;
($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,$var14,$var15,$var16,$var17,$var18) = split(/\|/,$line);
if ( $line =~ //) {
$line =~ s/\n//g;
} else {
$line =~ s/\n//g;
}
It converts the new line to table format and I've tried using that if statement to strip it out of there and it's not working.
Here is an image of what it looks like:
Please tell me what I'm doing wronf! Thank you! - Go there!