take my site here for instances, in the generated result you'll notice that the email, username, etc fields are mostly just between the column tags can perl read that?
IP: Logged |
posted
Ah, so what you're saying is that you're not actually thinking very hard about the problem and aren't willing to just try things and see what happens.
Posts: 10645 | Registered: Jul 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
dude your asking me to "try" $var=$query->param("tag-name"); for something that doesn't have a tag name. <td> </td> has no name so trying to fetch its parameter wont work. Its like asking me to put a square peg into a round hole to try it out, when we can clearly see it won't fit.
IP: Logged |
posted
Since you're interested in html, I suggest you do a search for something like "parse html" (without the quotation marks) on CPAN ( http://search.cpan.org/ ).
Also, your talking about "$query->param" shows you are very confused about what you are asking (edit: and about what it means to obtain a query parameter). Start by just writing very simple, high-level, but specific steps your program will need to take to accomplish its goal (from the beginning: for instance, does it need to run a query on that page first?)
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
posted
Blayne, I honestly don't understand how you could possibly be in your third year of programming classes and still be asking this sort of question.
Posts: 37449 | Registered: May 1999
| IP: Logged |
posted
It strikes me that "td" is the tag name, at least in the DOM. It doesn't have an ID or "name" attribute, but "td" is the tag name (tagName property of the element).
So I kind of understand how Blayne got confused - HTML has tag names, and whatever perl script he looked at has 'tag-name' as a placeholder for referring to the name of some name-value pair...eh.
Blayne, take the hint and either use the tools you know or start from the beginning if you need to understand perl.
Edit: don't take my first two paragraphs as a sign that you're on the right track. You're not.
Posts: 4287 | Registered: Mar 2005
| IP: Logged |
quote:Originally posted by TomDavidson: Blayne, I honestly don't understand how you could possibly be in your third year of programming classes and still be asking this sort of question.
I've had senior programmers with college degrees ask me similar questions. It's not as surprising as it should be.
Posts: 3486 | Registered: Sep 2002
| IP: Logged |
posted
There are lots of programming languages and people can be competent and useful to an organization and still ask dumb questions about other areas of expertise...
but perhaps the concern is with asking this sort of question without the merest effort to investigate the capabilities of a scripting language, and taking an invitation to self-educate as an invitation to dumbly insert an arbitrary line of code.
Posts: 4287 | Registered: Mar 2005
| IP: Logged |
posted
Yes, it can. Hm, that was an easy question.
Posts: 339 | Registered: Apr 2008
| IP: Logged |
Blayne Bradley
unregistered
posted
quote:Originally posted by scifibum: It strikes me that "td" is the tag name, at least in the DOM. It doesn't have an ID or "name" attribute, but "td" is the tag name (tagName property of the element).
So I kind of understand how Blayne got confused - HTML has tag names, and whatever perl script he looked at has 'tag-name' as a placeholder for referring to the name of some name-value pair...eh.
Blayne, take the hint and either use the tools you know or start from the beginning if you need to understand perl.
Edit: don't take my first two paragraphs as a sign that you're on the right track. You're not.
I'm not supposed to be using the DOM yet.
IP: Logged |
quote:Originally posted by Blayne Bradley: dude your asking me to "try" $var=$query->param("tag-name"); for something that doesn't have a tag name. <td> </td> has no name so trying to fetch its parameter wont work.
No, I'm not, actually. I'm asking you to take two minutes to think. Or else five minutes to try different things and see what happens. And why are you using perl to parse HTML, anyway?
Posts: 10645 | Registered: Jul 2004
| IP: Logged |
posted
"I'm not supposed to be using the DOM yet. "
Are you supposed to be using Perl? If so then you need to hit the books and learn it. The answer, as provided by manji, is yes, it can parse td tags (or any text*). Whether you should use Perl for that is another question. What you are trying to do is unclear. Why are you parsing the HTML on your search results page?
*I know this not because I'm conversant with Perl - I couldn't write a Perl program without significant googling - but because I've done some very minimal reading about Perl and learned that it does, indeed, handle text, just like every other general-purpose programming language.
Posts: 4287 | Registered: Mar 2005
| IP: Logged |
quote:Originally posted by TomDavidson: Blayne, I honestly don't understand how you could possibly be in your third year of programming classes and still be asking this sort of question.
In theory, it sounds crazy, but you're also talking to Blayne... I'm surprised you don't understand after three years of blayne posting.
Posts: 9912 | Registered: Nov 2005
| IP: Logged |