[25804] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8043 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 2 18:10:19 2005

Date: Mon, 2 May 2005 15:10:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 2 May 2005     Volume: 10 Number: 8043

Today's topics:
        start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <matternc@comcast.net>
    Re: start_table problem <emschwar@pobox.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <jgibson@mail.arc.nasa.gov>
    Re: start_table problem <sbryce@scottbryce.com>
    Re: start_table problem <mark.clementsREMOVETHIS@wanadoo.fr>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <matternc@comcast.net>
    Re: start_table problem <news5@sidestreet.gotdns.org>
    Re: start_table problem <matternc@comcast.net>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <matternc@comcast.net>
    Re: start_table problem <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 02 May 2005 21:16:00 +0300
From: Nikos <hackeras@gmail.com>
Subject: start_table problem
Message-Id: <d55qor$s50$2@nic.grnet.gr>

Why when i run this i get an eroor saying start_table is undef(i dont 
remmber the error exactly but its something abou the line with start_table


====================================================
print start_form(-action=>'games.pl');
     print start_table( {class=>'games'} );
         while( $row = $sth->fetchrow_hashref )
         {
             print Tr(
                      td( {-width=>'20%'},  submit( $row->{gamename} )),
                      td( {-width=>'75%'},  $row->{gamedesc}         ),
                      td( {-width=>'5%'},   $row->{gamecounter}      )
                   );
         }
     print end_table;
print end_form, br;

====================================================

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 21:21:12 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d55r2k$sgs$1@nic.grnet.gr>

Nikos wrote:
> Why when i run this i get an eroor saying start_table is undef(i dont 
> remmber the error exactly but its something abou the line with start_table

this to be exact:

Software error:

Undefined subroutine &main::start_table called at D:

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 15:15:25 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: start_table problem
Message-Id: <jqydnTAZZIfT4evfRVn-jQ@comcast.com>

Nikos wrote:

> Nikos wrote:
>> Why when i run this i get an eroor saying start_table is undef(i dont
>> remmber the error exactly but its something abou the line with
>> start_table
> 
> this to be exact:
> 
> Software error:
> 
> Undefined subroutine &main::start_table called at D:
> 

Odd, that's not the error I get.

syscjm@sakura:~$ cat testit.plx
print start_form(-action=>'games.pl');
     print start_table( {class=>'games'} );
         while( $row = $sth->fetchrow_hashref )
         {
             print Tr(
                      td( {-width=>'20%'},  submit( $row->{gamename} )),
                      td( {-width=>'75%'},  $row->{gamedesc}         ),
                      td( {-width=>'5%'},   $row->{gamecounter}      )
                   );
         }
     print end_table;
print end_form, br;
syscjm@sakura:~$ perl testit.plx
No comma allowed after filehandle at testit.plx line 12.
syscjm@sakura:~$

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: Mon, 02 May 2005 13:13:58 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: start_table problem
Message-Id: <etok6mhzbih.fsf@wilson.emschwar>

Nikos <hackeras@gmail.com> writes:
> Why when i run this i get an eroor saying start_table is undef(i dont
> remmber the error exactly but its something abou the line with
> start_table

Your error is on line 42.

Of course, I might be wrong, but since you can't be bothered to cut
and paste the correct error message, I can't be bothered to answer you
properly.

-=Eric
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
		-- Blair Houghton.


------------------------------

Date: Mon, 02 May 2005 22:22:50 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d55um7$246$1@nic.grnet.gr>

Chris Mattern wrote:
> Nikos wrote:
> 
> 
>>Nikos wrote:
>>
>>>Why when i run this i get an eroor saying start_table is undef(i dont
>>>remmber the error exactly but its something abou the line with
>>>start_table
>>
>>this to be exact:
>>
>>Software error:
>>
>>Undefined subroutine &main::start_table called at D:
>>
> 
> 
> Odd, that's not the error I get.
> 
> syscjm@sakura:~$ cat testit.plx
> print start_form(-action=>'games.pl');
>      print start_table( {class=>'games'} );
>          while( $row = $sth->fetchrow_hashref )
>          {
>              print Tr(
>                       td( {-width=>'20%'},  submit( $row->{gamename} )),
>                       td( {-width=>'75%'},  $row->{gamedesc}         ),
>                       td( {-width=>'5%'},   $row->{gamecounter}      )
>                    );
>          }
>      print end_table;
> print end_form, br;
> syscjm@sakura:~$ perl testit.plx
> No comma allowed after filehandle at testit.plx line 12.
> syscjm@sakura:~$
> 

I changed 'print end_form, br;' to 'print end_form;' but i still getting 
the same error which i dont understand it at all.

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 22:24:37 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d55uph$246$2@nic.grnet.gr>

Eric Schwartz wrote:
> Nikos <hackeras@gmail.com> writes:
> 
>>Why when i run this i get an eroor saying start_table is undef(i dont
>>remmber the error exactly but its something abou the line with
>>start_table
> 
> 
> Your error is on line 42.
> 
> Of course, I might be wrong, but since you can't be bothered to cut
> and paste the correct error message, I can't be bothered to answer you
> properly.
> 
> -=Eric

If you noticed, i post-followed up with the exact error message, but as 
you wish.

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 12:25:50 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: start_table problem
Message-Id: <020520051225500403%jgibson@mail.arc.nasa.gov>

In article <d55qor$s50$2@nic.grnet.gr>, Nikos <hackeras@gmail.com>
wrote:

> Why when i run this i get an eroor saying start_table is undef(i dont 
> remmber the error exactly but its something abou the line with start_table
> 
> 
> ====================================================
> print start_form(-action=>'games.pl');
>      print start_table( {class=>'games'} );
>          while( $row = $sth->fetchrow_hashref )
>          {
>              print Tr(
>                       td( {-width=>'20%'},  submit( $row->{gamename} )),
>                       td( {-width=>'75%'},  $row->{gamedesc}         ),
>                       td( {-width=>'5%'},   $row->{gamecounter}      )
>                    );
>          }
>      print end_table;
> print end_form, br;
> 
> ====================================================

Did you perhaps forget to include one of the following in your program?:

use CGI qw/:standard/;
use CGI qw/:standard *table/;
use CGI qw/:standard start_table/;

See the documentation for the CGI module:

perldoc CGI

It helps to post a complete, short-as-possible, program that
demonstrates the problem you are having. Had you done so, we would know
whether not including one of above statements was causing your problem.


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---


------------------------------

Date: Mon, 02 May 2005 13:26:04 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: start_table problem
Message-Id: <NMudnRTO06ZU4-vfRVn-2w@comcast.com>

Nikos wrote:

> Undefined subroutine &main::start_table called at D:

Usually this error means that you have an undefined subroutine 
&main::start_table that you are trying to call from the specified line. 
You would solve this problem by writing a start_table subroutine 
somewhere in the main package.

It could also mean that the start_table subroutine exists in another 
package, probably inside of a module, and you forgot to specify the 
package name.


------------------------------

Date: Mon, 02 May 2005 21:31:17 +0200
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: start_table problem
Message-Id: <42768002$0$3147$8fcfb975@news.wanadoo.fr>

Nikos wrote:
> Why when i run this i get an eroor saying start_table is undef(i dont 
> remmber the error exactly but its something abou the line with start_table
> 
Oh - OK, we'll just guess what the actual error message is, shall we?

How long would it have taken you to run this again to test? Are you 
determined to be annoying?

Anyway...

> 
> this to be exact:
> 
> Software error:
> 
> Undefined subroutine &main::start_table called at D: 

man perldiag

explains what error messages mean. Of course, in this case the error 
message is perfectly clear? Have you read it? I suspect that you have 
mispasted the error message anyway - d: is normally a drive 
specification rather than a file path.

I'd have thought this particular error messages was fairly 
self-explanatory. What do you *think* it means?

In order to try to minimise the pain here, because you won't bother to 
read the documentation (see *numerous* other tedious threads for proof - 
do you ever look at old threads you have kicked off, Nikos. If you did 
you may see a familiar pattern):

you have forgotten to either use CGI or to tell it which subroutines you 
want to import:

try

use CGI qw(:standard);

Try reading the documentation for CGI. Oh, sorry - I forgot. You don't 
read documentation. Luckily you don't need to: others are more than 
willing to read all the documentation that you need for you, and explain 
it to you painstakingly.

Can someone please tell me why I'm bothering with this :(

Mark




------------------------------

Date: Mon, 02 May 2005 22:31:58 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d55v7b$2jj$1@nic.grnet.gr>

Jim Gibson wrote:
> In article <d55qor$s50$2@nic.grnet.gr>, Nikos <hackeras@gmail.com>
> wrote:
> 
> 
>>Why when i run this i get an eroor saying start_table is undef(i dont 
>>remmber the error exactly but its something abou the line with start_table
>>
>>
>>====================================================
>>print start_form(-action=>'games.pl');
>>     print start_table( {class=>'games'} );
>>         while( $row = $sth->fetchrow_hashref )
>>         {
>>             print Tr(
>>                      td( {-width=>'20%'},  submit( $row->{gamename} )),
>>                      td( {-width=>'75%'},  $row->{gamedesc}         ),
>>                      td( {-width=>'5%'},   $row->{gamecounter}      )
>>                   );
>>         }
>>     print end_table;
>>print end_form, br;
>>
>>====================================================
> 
> 
> Did you perhaps forget to include one of the following in your program?:
> 
> use CGI qw/:standard/;
> use CGI qw/:standard *table/;
> use CGI qw/:standard start_table/;
> 
> See the documentation for the CGI module:
> 
> perldoc CGI
> 
> It helps to post a complete, short-as-possible, program that
> demonstrates the problem you are having. Had you done so, we would know
> whether not including one of above statements was causing your problem.

Iam using this: use CGI qw(:standard)

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 22:33:00 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d55v99$2jj$2@nic.grnet.gr>

Scott Bryce wrote:
> Nikos wrote:
> 
>> Undefined subroutine &main::start_table called at D:
> 
> 
> Usually this error means that you have an undefined subroutine 
> &main::start_table that you are trying to call from the specified line. 
> You would solve this problem by writing a start_table subroutine 
> somewhere in the main package.
> 
> It could also mean that the start_table subroutine exists in another 
> package, probably inside of a module, and you forgot to specify the 
> package name.


Inside games.pl i dont use any subs.

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 22:35:27 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d55vds$2jj$3@nic.grnet.gr>

Mark Clements wrote:
> Nikos wrote:
> 
>> Why when i run this i get an eroor saying start_table is undef(i dont 
>> remmber the error exactly but its something abou the line with 
>> start_table
>>
> Oh - OK, we'll just guess what the actual error message is, shall we?
> 
> How long would it have taken you to run this again to test? Are you 
> determined to be annoying?
> 
> Anyway...
> 
>>
>> this to be exact:
>>
>> Software error:
>>
>> Undefined subroutine &main::start_table called at D: 
> 
> 
> man perldiag
> 
> explains what error messages mean. Of course, in this case the error 
> message is perfectly clear? Have you read it? I suspect that you have 
> mispasted the error message anyway - d: is normally a drive 
> specification rather than a file path.
> 
> I'd have thought this particular error messages was fairly 
> self-explanatory. What do you *think* it means?
> 
> In order to try to minimise the pain here, because you won't bother to 
> read the documentation (see *numerous* other tedious threads for proof - 
> do you ever look at old threads you have kicked off, Nikos. If you did 
> you may see a familiar pattern):
> 
> you have forgotten to either use CGI or to tell it which subroutines you 
> want to import:
> 
> try
> 
> use CGI qw(:standard);
> 
> Try reading the documentation for CGI. Oh, sorry - I forgot. You don't 
> read documentation. Luckily you don't need to: others are more than 
> willing to read all the documentation that you need for you, and explain 
> it to you painstakingly.
> 
> Can someone please tell me why I'm bothering with this :(
> 
> Mark


Iam using
use CGI qw(:standard);

and the exact error message is:

Undefined subroutine &main::start_table called at 
D:\www\cgi-bin\games.pl line 44.

just where the print start_table line is.

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 15:54:16 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: start_table problem
Message-Id: <5YOdna3gFcP0GOvfRVn-vw@comcast.com>

Nikos wrote:

> Scott Bryce wrote:
>> Nikos wrote:
>> 
>>> Undefined subroutine &main::start_table called at D:
>> 
>> 
>> Usually this error means that you have an undefined subroutine
>> &main::start_table that you are trying to call from the specified line.
>> You would solve this problem by writing a start_table subroutine
>> somewhere in the main package.
>> 
>> It could also mean that the start_table subroutine exists in another
>> package, probably inside of a module, and you forgot to specify the
>> package name.
> 
> 
> Inside games.pl i dont use any subs.
> 
Uh, yes you do.  Maybe you didn't mean to, but that's what you wrote:

print start_table( blah blah );

That syntax calls a subroutine called &start_table.  If you haven't
defined such a subroutine, you get an error.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: Mon, 02 May 2005 19:55:49 GMT
From: Trey Waters <news5@sidestreet.gotdns.org>
Subject: Re: start_table problem
Message-Id: <Pine.LNX.4.61.0505021542130.2026@pbhtne.fvqrfgerrg.tbgqaf.bet>

On Mon, 2 May 2005, Nikos wrote:

> 
> Iam using this: use CGI qw(:standard)
> 
> -- 

Just to point out the relevant section from `perldoc CGI`:

       With a few exceptions (described below), start_tag_name
       and end_tag_name functions are not generated automatically
       when you use CGI.  However, you can specify the tags you
       want to generate start/end functions for by putting an
       asterisk in front of their name, or, alternatively,
       requesting either "start_tag_name" or "end_tag_name" in
       the import list.

Funny thing is, the section of the CGI.pm documentation relevant to this 
question was found with the FIRST match of searching for "start_table".  I 
will admit, the text of the paragraph can be a little confusing (esp. if 
you're like me, and not the quickest kid on the block), but the example 
that follows makes it perfectly clear.

I will let you figure out how to use perldoc to find the example in the 
CGI.pm docs which will show you how to fix your error message.  :)

Hint:  Someone else has already given you the answer.

+-----------------------------------------------------------------------+
 Trey Waters                                 news5@sidestreet.gotdns.org
                  Experience is the worst teacher.
     It always gives the test first and the instruction afterward.
+-----------------------------------------------------------------------+


------------------------------

Date: Mon, 02 May 2005 15:55:59 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: start_table problem
Message-Id: <5YOdnazgFcNSGOvfRVn-vw@comcast.com>

Nikos wrote:

> Mark Clements wrote:
>> Nikos wrote:
>> 
>>> Why when i run this i get an eroor saying start_table is undef(i dont
>>> remmber the error exactly but its something abou the line with
>>> start_table
>>>
>> Oh - OK, we'll just guess what the actual error message is, shall we?
>> 
>> How long would it have taken you to run this again to test? Are you
>> determined to be annoying?
>> 
>> Anyway...
>> 
>>>
>>> this to be exact:
>>>
>>> Software error:
>>>
>>> Undefined subroutine &main::start_table called at D:
>> 
>> 
>> man perldiag
>> 
>> explains what error messages mean. Of course, in this case the error
>> message is perfectly clear? Have you read it? I suspect that you have
>> mispasted the error message anyway - d: is normally a drive
>> specification rather than a file path.
>> 
>> I'd have thought this particular error messages was fairly
>> self-explanatory. What do you *think* it means?
>> 
>> In order to try to minimise the pain here, because you won't bother to
>> read the documentation (see *numerous* other tedious threads for proof -
>> do you ever look at old threads you have kicked off, Nikos. If you did
>> you may see a familiar pattern):
>> 
>> you have forgotten to either use CGI or to tell it which subroutines you
>> want to import:
>> 
>> try
>> 
>> use CGI qw(:standard);
>> 
>> Try reading the documentation for CGI. Oh, sorry - I forgot. You don't
>> read documentation. Luckily you don't need to: others are more than
>> willing to read all the documentation that you need for you, and explain
>> it to you painstakingly.
>> 
>> Can someone please tell me why I'm bothering with this :(
>> 
>> Mark
> 
> 
> Iam using
> use CGI qw(:standard);

No you aren't.  I looked back at the code you posted and there are no
use statements in it of any kind.  We cannot debug code you do not post.
> 
> and the exact error message is:
> 
> Undefined subroutine &main::start_table called at
> D:\www\cgi-bin\games.pl line 44.
> 
> just where the print start_table line is.
> 

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: Mon, 02 May 2005 23:00:37 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d560t2$402$1@nic.grnet.gr>

Chris Mattern wrote:

> print start_table( blah blah );
> 
> That syntax calls a subroutine called &start_table.  If you haven't
> defined such a subroutine, you get an error.

I see. Can i write it someway else?

This way is ok,- but unfortunately it creates a lot of tables instead of 
one:

print start_form(-action=>'games.pl');
         while( $row = $sth->fetchrow_hashref )
         {
	  print table( {class=>'games'},
              print Tr(
                      td( {-width=>'20%'},  submit( $row->{gamename} )),
                      td( {-width=>'75%'},  $row->{gamedesc}         ),
                      td( {-width=>'5%'},   $row->{gamecounter}      )
              );
         }
print end_form;


I need to get the print table before the while which is what i tried but 
it gives me that damn error.

How can i put the print table before the while? Is there a way other 
than print start_table?

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 23:02:56 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d5611d$402$2@nic.grnet.gr>

Trey Waters wrote:
> On Mon, 2 May 2005, Nikos wrote:
> 
> 
>>Iam using this: use CGI qw(:standard)
>>
>>-- 
> 
> 
> Just to point out the relevant section from `perldoc CGI`:
> 
>        With a few exceptions (described below), start_tag_name
>        and end_tag_name functions are not generated automatically
>        when you use CGI.  However, you can specify the tags you
>        want to generate start/end functions for by putting an
>        asterisk in front of their name, or, alternatively,
>        requesting either "start_tag_name" or "end_tag_name" in
>        the import list.
> 
> Funny thing is, the section of the CGI.pm documentation relevant to this 
> question was found with the FIRST match of searching for "start_table".  I 
> will admit, the text of the paragraph can be a little confusing (esp. if 
> you're like me, and not the quickest kid on the block), but the example 
> that follows makes it perfectly clear.
> 
> I will let you figure out how to use perldoc to find the example in the 
> CGI.pm docs which will show you how to fix your error message.  :)

Can you beleive that i dont know at all how to use perldoc even how to 
serach the syntax of print?

i have activestates perl.
Can i see the help document in browser somehow or is better in console?

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Mon, 02 May 2005 23:04:55 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d56154$402$3@nic.grnet.gr>

Chris Mattern wrote:

> No you aren't.  I looked back at the code you posted and there are no
> use statements in it of any kind.  We cannot debug code you do not post.

Iam suign it i just did not post it but since it seems you want it and 
blame me for not psoting all the code, here, take it ALL :-)

#!/usr/bin/perl
use strict;
use warnings;
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
use DBD::mysql;
use POSIX qw(strftime);

print header( -charset=>'iso-8859-7' );
print start_html( -style=>'/data/tmpl/style.css',
                   -title=>'Παιχνίδια για κατέβασμα!',
                   -background=>'/data/images/night.gif' );

my ($sth, $row);
my $gamename = param('gamename');
my $host = gethostbyaddr (pack ("C4", split (/\./, 
$ENV{'REMOTE_ADDR'})), 2) || $ENV{REMOTE_ADDR};
my $dbh = DBI->connect('DBI:mysql:nikos_db', 'root', 'tiabhp2r') or 
{RaiseError=>1};

#===============================================================================

my @row;
$sth = $dbh->prepare( 'INSERT INTO games (gamename, gamedesc, 
gamecounter) VALUES (?, ?, ?)' );

open (FILE, "<../data/games/descriptions.txt") or die $!;
     while (<FILE>) {
         chomp;

         @row = split /\t/;
         push @row, 0;

         $sth->execute( @row );
     }
close (FILE);

#===============================================================================

print span( {class=>'lime'},    "Από εδώ μπορείς να κατεβάσεις ωραία 
απλά παιχνίδια που έχω επιλέξει!" ), br;
print span( {class=>'yellow'},  "Μπορείς να επικοινωνήσεις μαζί μου στο 
hackeras\@gmail.com" ), br() x 2;

$sth = $dbh->prepare( "SELECT * FROM games" );
$sth->execute;

print start_form(-action=>'games.pl');
     print start_table( {class=>'games'} );
         while( $row = $sth->fetchrow_hashref )
         {
             print Tr(
                      td( {-width=>'20%'},  submit( $row->{gamename} )),
                      td( {-width=>'75%'},  $row->{gamedesc}         ),
                      td( {-width=>'5%'},   $row->{gamecounter}      )
                   );
         }
     print end_table;
print end_form;

print br;

if ( !param() ) {
     print p( {-align=>'center'},  a( {href=>'index.pl'},  img 
{src=>'../data/images/back.gif'} ));
}

#===============================================================================

if( param() )
{
     $dbh->do( "UPDATE games SET gamecounter=gamecounter+1 WHERE 
gamename=$gamename" );
     $dbh->do( "UPDATE visitorlog SET passage=$gamename WHERE host=$host" );

     $sth = $dbh->prepare( "SELECT gamename, gamecounter FROM games 
where gamename=?" );
     $sth->execute( $gamename );
     $row = $sth->fetchrow_hashref;

     print span( {class=>'lime'},    "Είσαι ο $row->gamecounter ος που 
κατεβάζει το $row->gamename!!" ), br;
     print span( {class=>'yellow'},  "Ελπίζω να σου αρέσει και να σου 
φανεί χρήσιμο!" );

     print p( {-align=>'center'},  a( {href=>'index.pl'},  img 
{src=>'../data/images/back.gif'} ));
     print "<script 
language='Javascript'>location.href=/data/games/$gamename.rar</script>";
}




------------------------------

Date: Mon, 02 May 2005 16:23:30 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: start_table problem
Message-Id: <29udnSIphM_fEevfRVn-vA@comcast.com>

Nikos wrote:

> Chris Mattern wrote:
> 
>> No you aren't.  I looked back at the code you posted and there are no
>> use statements in it of any kind.  We cannot debug code you do not post.
> 
> Iam suign it i just did not post it 

And I am supposed to use my magic telepathy hat to debug code you are
using but not posting, I guess.

> but since it seems you want it and 
> blame me for not psoting all the code, here, take it ALL :-)
> 
Post a simple and complete program that is the minimum necessary to 
reproduce the problem.  As you have been asked to do MANY, MANY times.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: Mon, 2 May 2005 21:07:01 +0000 (UTC)
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: start_table problem
Message-Id: <Xns964AAE1F517CAasu1cornelledu@132.236.56.8>

Nikos <hackeras@gmail.com> wrote in news:d5611d$402$2@nic.grnet.gr:

> i have activestates perl.
> Can i see the help document in browser somehow or is better in
> console? 

How few brain cells do you really have to have to be able to go 

Start -> Programs -> ActiveState ActivePerl 5.8 -> Documentation

Please do not answer this question.

Please STOP abusing this newsgroup.

Please consider physically relocating to another planet, or maybe, at least 
take up C programming. I hear the folks in comp.lang.c are much, much 
friendlier.

Besides, C is fast, lightning fast.

Sinan.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8043
***************************************


home help back first fref pref prev next nref lref last post