start_table problem

E

Eric Schwartz

Nikos said:
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 :)

We do not want all. We want the smallest possible code required to
show the problem. Don't start with all of the code you have--
instead, figure out where the problem is, and then start with only
that code. You actually got that part right. Then, put it in a file
by itself, and add only the bare minimum required to get that code
running. Then start deleting code until you can't reproduce the
problem anymore-- most often, this will in itself help you find the
problem.

Only then should you cut and paste the entire example-- not your
original file, just the example. However, if you find yourself
pasting more than about 20 lines, then you probably haven't simplified
your code enough yet, so keep working on it.

Also, you need to sit down and read all of "Learning Perl", about
three times. I know it's hard, I know you don't like to work that
way-- sorry, but that's life. If you want to irritate everyone here
who knows how to help you enough so that they killfile you, and the
only people who see your posts don't know the right way to answer,
then please continue the way you have been. If you want to get the
best answers possible from the smartest people, then stop right now,
and work your way through the book, very slowly. Also, read the FAQ,
and learn how to search the documentation to find the answer you're
looking for.

And always always ALWAYS cut and paste error messages EXACTLY. Do NOT
retype them, as you will make mistakes. Do NOT retype your example
code, as you will make mistakes there, too. ALWAYS cut and paste!
ALWAYS!

-=Eric (seriously, always)
 
N

Nikos

Chris said:
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.

That what i did Chris! I posted the 5-6 lines of code containing the
strt_table that i was having problem with.
 
N

Nikos

Fabian said:
Well, reading this I understand why you're asking all your annoying
questions here. You don't know *how* to read the docs.

Hiltherto, you have told you won't read at all. -- Is the time coming
where you want to read the docs yourself? Hoping this, I'll answer your
question:

`perldoc` is a program you can call from your console.

To read the docs of one module you have to type `perldoc Module` -- in
the case of CGI.pm (see above) you just have to type `perldoc CGI` as
Trey has mentioned in his posting. When looking for some information
about one of Perl's builtin functions like print(), you have to type
`perldoc -f print`. All this is done from your console.




Additionally, when using ActiveState's Perl all these informations are
already available in HTML format. Scout about a subdirectory of Perl's
install dir (AFAIR, "C:\perl" as default) named "html". This HTML pages
are using frames: a left one to show a navigation bar and a right one to
show the information you have choosen in the first. The navigation bar
begins with some ActiveState stuff, followed by the core docs. When
scrolling down some lines you see the docs for all installed modules. As
Sinan has pointed to, there is also a link in your start menu.

Please, have a look at this and try to read it.

regards,
fabian

Thank you fabian, i really must start to read some docs or else iam
gonna ask for everything.
I must tell you that i was always afriad to look at the docs because i
think that they are complicated and even if i try to find an answer
there for a problem i currently facing it will be very hard to do so.

Anyway, i will try but it hink this will happena gain.

perldoc -f print

what does the -f switch stands for? find maybe?
So for every function i must ask perl to find help for that and for
every module -f is never required?

Also, i often see perl -e 'something'

Is this for trying instantly on console one statement and see directly
the output without having to create a perl prog to do that?
 
M

Mark Clements

Nikos said:
Thank you fabian, i really must start to read some docs or else iam
gonna ask for everything.
"gonna" as in future tense? Are you *kidding*?
I must tell you that i was always afriad to look at the docs because i
think that they are complicated and even if i try to find an answer
there for a problem i currently facing it will be very hard to do so.

Anyway, i will try but it hink this will happena gain.

perldoc -f print

what does the -f switch stands for? find maybe?
So for every function i must ask perl to find help for that and for
every module -f is never required?

Also, i often see perl -e 'something'

Is this for trying instantly on console one statement and see directly
the output without having to create a perl prog to do that?

Read the documentation about the documentation. How to do this is - wait
for it - covered in the *posting guidelines*, which you clearly *still*
haven't read.

perldoc perldoc

will, funnily enough, tell you about perldoc.


perldoc perlrun

will tell you about command-line switches for perl.


perldoc perl

will tell you which set of manpages to look in for documentation on
certain topics.

All of this is documented elsewhere. Nikos: do you really read *nothing*
beyond what is posted here?

You are never going to modify your approach, are you? I may have to
abandon reading this newsgroup: there is little point in killfiling you
because you generate so much traffic (most of it pointing out the error
of your ways to you, *none* of which you listen to) I'll see your posts
anyway.

Mark
 
N

Nikos

Mark said:
All of this is documented elsewhere. Nikos: do you really read *nothing*
beyond what is posted here?

I didnt even read the book i bought Perl- How to Program by Deitel.
You are never going to modify your approach, are you? I may have to
abandon reading this newsgroup: there is little point in killfiling you
because you generate so much traffic (most of it pointing out the error
of your ways to you, *none* of which you listen to) I'll see your posts
anyway.

No please that wouldnt be fair.
You will NOT abandon reading this fine ng as well getting helped and
help others because of me.
I'am the one that doesnt read the docs and causing too much traffic
because i cant deal with the singlest problem i encounter.
I cause problem, and i ahve to go, not you.

I know i never gonan be a Perl Programmer because i dont have enouph
strengh of reading the docs and also i am a very unpatient persom.
When i enounter a problem i want it to be solved rigth away but i dont
know how to fix it or read soemthing that will talk about it, not 100
other stuff before i get to what i am looking for, i hate that.

The past few days i asked a huge amoutn of questions because i needed
help of correcting my perl cgi script that i run from my local
webserver. I just wanne get this fixed and nothing more.

I'am not going to ask forever. Maybe very rarely when something bothers
me ill ask. Now i have css problems as well, the perl is ok. i just cant
get some part of my website to look exactly as i want them.

I'am willing to read the docs but *only* that part that it *will* answer
my questions, not other general stuff, so the problem will be quickly fixed.

Anyway, please do not let those hard endless days that i was asking here
for almost about everything scare you and go away.

I 'll leave aa=nd maybe once in a while(rarely) i'll ask somethign specific.

Sorry for the trouble.
 
C

Chris Mattern

Nikos said:
That what i did Chris! I posted the 5-6 lines of code containing the
strt_table that i was having problem with.
No, you didn't. It was not a complete program. The use statements are
relevant because they define the subroutines you are attempting to call.

--
Christopher Mattern

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

Nikos

Chris said:
Nikos wrote:



No, you didn't. It was not a complete program. The use statements are
relevant because they define the subroutines you are attempting to call.

If i knew that i would post the use statements as well.

So what can i do to fix it?
 
N

Nikos

Nikos said:
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;

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

it worked!
i just changed print start_table( {class=>'games'} );
with print table( {class=>'games'} ); and it worked!
 
C

Chris Mattern

Nikos said:
If i knew that i would post the use statements as well.

So you're using a module with no idea what it does.
So what can i do to fix it?
Read the documentation for your CGI module so you know what the hell you're
doing.

--
Christopher Mattern

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

Mark Clements

Nikos said:
I didnt even read the book i bought Perl- How to Program by Deitel.
You surprise me.
No please that wouldnt be fair.
You will NOT abandon reading this fine ng as well getting helped and
help others because of me.
I'am the one that doesnt read the docs and causing too much traffic
because i cant deal with the singlest problem i encounter.
I cause problem, and i ahve to go, not you.
Don't worry yourself: you've prompted me to change newsreader. I can now
ignore any thread that you start completely. This will be better for my
sanity.

I'am willing to read the docs but *only* that part that it *will* answer
my questions, not other general stuff, so the problem will be quickly
fixed.
So far, you haven't read the bits of the documentation that you need to
that people have suggested you read, so I don't really know what to say
here. Generally, you won't magically know which bits you need to read
unless you have a good overall understanding. You don't have this, in
fact, you're unlikely ever to have it.
Anyway, please do not let those hard endless days that i was asking here
for almost about everything scare you and go away.

I 'll leave aa=nd maybe once in a while(rarely) i'll ask somethign
specific.
Crap. You've promised to make changes before and it has never happened.
Goodbye.
 
T

Tad McClellan

Nikos said:
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^

If i knew that i would post the use statements as well.


If you had bothered to build a small and complete program *that we can run*,
then you *would* have known that.

(that is exactly the reason behind the Guideline's suggestion in the 1st place.)

So what can i do to fix it?


Post a small and complete program *that we can run* as suggested
in the Posting Guidelines to maximize your chances of getting
a useable answer.
 
G

Gunnar Hjalmarsson

Mark said:
I may have to abandon reading this newsgroup: there is little point
in killfiling you because you generate so much traffic

And *that* is not Nikos' fault, is it?
 
T

Tad McClellan

i really must start to read some docs or else iam
gonna ask for everything.


Many many people have said that many many times over the last
few days. You're not a very quick study I'm afraid...

perldoc -f print

what does the -f switch stands for?


The Posting Guidelines cover that.

The Posting Guidelines suggest many ways to increase your
chances of getting a useable answer.

Why do you insist on *minimizing* your chances? It makes no sense!

Do you really want answers or not?

If you really want answers, follow the guidelines.

Also, i often see perl -e 'something'


"perl" is a different program from "perldoc", so it of course
has different command line switches.

The command lines switches for the "perl" program are documented in:

perldoc perlrun

Is this for trying instantly on console one statement and see directly
the output without having to create a perl prog to do that?


I dunno, go see what perlrun says it does, then try it out yourself.
 
J

Jürgen Exner

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

Guess what, considering your numerous contributions to this NG that fact is
blatently obvious to anyone!

jue
 
G

Gunnar Hjalmarsson

Anno said:
It is an immediate consequence of his behavior.

True, of course, but... Don't we who respond have an option? Are we
just helpless victims of the circumstances?

Don't think so.
 
A

Anno Siegel

Gunnar Hjalmarsson said:
True, of course, but... Don't we who respond have an option? Are we
just helpless victims of the circumstances?

Individually we have a choice. As a collective, there will always be
*someone* who can't let a certain provocation slip by. Given the number
of provocations, the kind of thread we are seeing is hardly avoidable.

Anno
 
G

Gunnar Hjalmarsson

Anno said:
Individually we have a choice. As a collective, there will always be
*someone* who can't let a certain provocation slip by. Given the number
of provocations, the kind of thread we are seeing is hardly avoidable.

Self-criticism and reflection aren't harmful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top