|
|
Joined: Aug 2000
Posts: 37
Member
|
Member
Joined: Aug 2000
Posts: 37 |
| ); } ---------------------/code----------------------------- (as you may have noticed the name of the field IS changed by 1) now, after that, i want to create a file with the gamename, and putting ALL the codes/codenames into the folder. i am using the following code --------------------------------------code----------------------------------- open (FILE, ">$gameName.txt"); print FILE $description[$count]; print FIKE $code[$count]; close FILE } ----------------------------/code-----------------------------------
now my problem is that its NOT printing the codes, nor the code names in the txt field, and it IS printing $gamename.txt
can someone please help me?
---------------------------all code----------------------------------- #!C:Perlbinperl.exe
print "Content-type: text/htmlnn";
use CGI qw(:standard);
for ($count = 1; $count <= $number; $count++){ @description[$count] = param("description$count"); @codes[$count] = param ("code$count"); }
$number= param('NumberOfCodes') || 10; $user = param('user'); $pass = param('pass'); $gameName = param ('name'); $code = param ('codes$count');
print qq( );
print <
InitialHTML ;
if (($user eq "whatever") && ($pass eq "whatever")){ &works; } else { $wrong; } sub wrong{ print "Wrong stupid! Get out!"; }
sub works{ print < endHTML open (FILE, ">$gameName.txt"); print FILE $description[$count]; print FIKE $code[$count]; close FILE }
------------------ check out my site at http://www.ultimategamers2000.com
|
|
|
Joined: Sep 2000
Posts: 138
Member
|
Member
Joined: Sep 2000
Posts: 138 |
open (FILE, ">$gameName.txt") or die $!; print FILE $description[$count]; print FI KE $code[$count]; close FILE or die $!; And see whats bold? Oh and if you like: print qq( Hi #27 ); you have to: print qq( Hi #27 ); ------------------ This message has been edited by Em8 on January 11, 2001 at 07:00 PM
|
|
|
|
Joined: Aug 2000
Posts: 37
Member
|
Member
Joined: Aug 2000
Posts: 37 |
does that mean that i have to change print qq( $count | ); with print qq( $count | ); ? o, and that FIKE thing didnt work, try it on your own machine... it wont work! and i have NOidea why! ------------------ check out my site at http://www.ultimategamers2000.com This message has been edited by ultimategamer2k on January 11, 2001 at 07:48 PM
|
|
|
|
Joined: Oct 2000
Posts: 24
Member
|
Member
Joined: Oct 2000
Posts: 24 |
print qq( $count | ); Nope, qq means Double Quote, it's the same as using standard speech marks - with the added bonus of not having to escape anyother character other than the one you use as a limiter/delimeter. I recommend you use something other than a bracket in a qq statement, pick something odd, like the tidle. print " ";
is the same as
print qq!!; and print qq~~;
...etc.
|
|
|
|
Joined: Oct 2000
Posts: 24
Member
|
Member
Joined: Oct 2000
Posts: 24 |
Interesting, I'm not sure if you can parse a dynamic parameter like this: If you can, you need to get the scripts to interpolate it like so (add speechmarks) If all else fails, try this: This message has been edited by Matt@ikonboard on January 11, 2001 at 07:59 PM
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 70
Joined: January 2007
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|