[25744] in Perl-Users-Digest
Perl-Users Digest, Issue: 7984 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 17 14:05:39 2005
Date: Sun, 17 Apr 2005 11:05:09 -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 Sun, 17 Apr 2005 Volume: 10 Number: 7984
Today's topics:
Re: Comparing Regular Expressions <jm@bourguet.org>
Compose a outlook mail with voting button mluvw47@gmail.com
Re: Compose a outlook mail with voting button <see_sig@invalid>
Re: DBI update <youdontknowme@stranger.com>
Re: DBI update <tadmc@augustmail.com>
Re: Is Perl open source? <comdog@panix.com>
Re: Is Perl open source? <matternc@comcast.net>
Re: LWP <spamtrap@dot-app.org>
Re: memory leak in loop (Mike Solomon)
On the computer -- a help or hinderance? <69-no-spam@69.69.69.69.invalid>
outputting the results of something.pl <backhaul14@sbcglobal.net>
Re: outputting the results of something.pl <no@email.com>
Re: outputting the results of something.pl <jfcampbell@aol.com>
Re: parsing directory <spamtrap@dot-app.org>
Re: parsing directory <noreply@gunnar.cc>
Re: Parsing user-entered content to remove rude words <blgl@hagernas.com>
Re: Parsing user-entered content to remove rude words (Anno Siegel)
Perl HTML::TableExtract Question <none@none>
Re: Perl HTML::TableExtract Question <none@none>
Re: Perl HTML::TableExtract Question <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 17 Apr 2005 09:29:45 +0200
From: Jean-Marc Bourguet <jm@bourguet.org>
Subject: Re: Comparing Regular Expressions
Message-Id: <87is2lrhcm.fsf@news.bourguet.org>
Jean-Marc Bourguet <jm@bourguet.org> writes:
> Robert Inder <robert@deadspam.com> writes:
>
> > Even some pointers to work that "merely" dealt with regular RE's
> > would be a great help.
>
> I think both Torben Ægidius Mogensen
> (7zhdikt6sn.fsf@app-2.diku.dk) and me
> (pxbu0mk9l0w.fsf@news.bourguet.org) have outlined the
> algorithms you want. It would help to give you better
> responses if you state what you think is missing.
>
> The algorithm for going from a RE to a FSM is probably in
> every introduction book on compiler.
flex gives a warning when a rule can never be matched. So
you have an easy way to check if two regular expressions are
identical: input two files consisting simply of the two
expressions in both order. If flex gives that warning for
both files, they are identicals, if flex gives a warning
only for one file, the second in that file regexp is a
subset of the first, if flex never give a warning, both
expressions are able to match strings that the other can
not.
Yours,
--
Jean-Marc
------------------------------
Date: 17 Apr 2005 07:56:32 -0700
From: mluvw47@gmail.com
Subject: Compose a outlook mail with voting button
Message-Id: <1113749792.326129.324670@o13g2000cwo.googlegroups.com>
Hi,
Is that a way programatically compose a outlook mail with voting
button,"Yes;No" using perl?
I know the way to send SMTP mail, but I am not very sure how to do
the above task.
Any comments are welcome,
Regards,
M
------------------------------
Date: Sun, 17 Apr 2005 13:37:09 -0400
From: Bob Walton <see_sig@invalid>
Subject: Re: Compose a outlook mail with voting button
Message-Id: <42629f8a$1_1@127.0.0.1>
mluvw47@gmail.com wrote:
...
> Is that a way programatically compose a outlook mail with voting
> button,"Yes;No" using perl?
>
> I know the way to send SMTP mail, but I am not very sure how to do
> the above task.
What you want to do isn't very clear. Do you want to click on a
button and have an email composed and sent, or do you want to
send an email that contains buttons the recipient can click on
and somehow have which button was clicked sent back to you?
Assuming the latter, there might possibly be something in Outlook
that would permit that (I know very little about Outlook, so that
is just speculation -- ask in an Outlook newsgroup if you want
expertise on Outlook), but you would be shutting out the entire
rest of the world that doesn't use Outlook, like me. The best
thing would be to include web page addresses in your email.
Those addressess could be to a CGI program that emails the
response back to you when the link is clicked, or otherwise
tallies the responses. You would want to stick to text links, as
many folks (like me) will never see an email that contains HTML
(just autodeleting email based on that criterion gets rid of 100%
of the porn, 90% of the other spam and none of the non-spam that
I care to see). That would have the advantage of working in any
email client, even Outlook. Most email clients these days
automatically make links out of things that look like http://...
, so it would be easy for the recipient.
...
> M
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
----== 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: Sun, 17 Apr 2005 12:29:55 +0100
From: "Bigus" <youdontknowme@stranger.com>
Subject: Re: DBI update
Message-Id: <O8ednVuBl6SI1P_fRVnyug@giganews.com>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnd62hkt.h2e.tadmc@magna.augustmail.com...
> Bigus <youdontknowme@stranger.com> wrote:
> >
> > "Tad McClellan" <tadmc@augustmail.com> wrote in message
> > news:slrnd5tunb.9aa.tadmc@magna.augustmail.com...
> >> > my $sth = $db->prepare("UPDATE items SET $set WHERE id =
> >> > '$form{selitem}'");
> >>
> >>
> >> You should use a placeholder for $form{selitem} too, or otherwise
> >> arrange for proper quoting of its value.
> >
> > $form{selitem} is always an integer, so don't need to do I?
>
>
> I assume from the hash name that the value comes from a <form> ?
>
> If you are properly untainting it, then you wouldn't need other quoting.
>
> Are you properly untainting it?
Not 100% what you mean by 'untaint', but I use these lines to process the
form data into the hash:
use CGI;
$query = new CGI;
%form = $query->Vars();
Bigus
------------------------------
Date: Sun, 17 Apr 2005 09:31:57 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: DBI update
Message-Id: <slrnd64sqt.uje.tadmc@magna.augustmail.com>
Bigus <youdontknowme@stranger.com> wrote:
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnd62hkt.h2e.tadmc@magna.augustmail.com...
>> Are you properly untainting it?
>
> Not 100% what you mean by 'untaint',
I think a more accurate assessment would be that you are 0% sure
what I meant by untaint?
You will learn more if you are up-front about what it is you don't know,
because then someone can help you learn it.
*All* CGI programs that take form input should use Perl's "taint checking"
mechanism to help protect against getting hacked.
perldoc perlsec
> but I use these lines to process the
> form data into the hash:
>
> use CGI;
> $query = new CGI;
Surely you don't _really_ do it that way.
You probably meant this instead:
my $query = new CGI;
since you should have "use strict;" in all of your Perl programs.
See the docs mentioned above for how to untaint your tainted data.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 17 Apr 2005 00:48:05 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Is Perl open source?
Message-Id: <170420050048054647%comdog@panix.com>
In article <slrnd633e8.1am.tassilo.von.parseval@localhost.localdomain>,
Tassilo v. Parseval <tassilo.von.parseval@rwth-aachen.de> wrote:
> Also sprach brian d foy:
> > In article <ctednT0c5q66nsLfRVn-3w@comcast.com>, Chris Mattern
> ><matternc@comcast.net> wrote:
> >> I did say *often*, not *always*. Of course, anybody doing tasks
> >> with hard real-time requirements in Perl is certifiable.
> > Certifiably what? I do things with hard real-time requirements
> > in Perl.
> I strongly doubt that. Perl is inherently unsuitable for those kind of
> tasks. Most languages and environments in fact are.
Maybe someone should define some terms then, because we haven't
talked about anything specific, but everyone seems to think we're
talking about something specific. :)
--
brian d foy, comdog@panix.com
Subscribe to The Perl Review: http://www.theperlreview.com
------------------------------
Date: Sun, 17 Apr 2005 11:05:35 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Is Perl open source?
Message-Id: <46WdnYcAoaTc5v_fRVn-qg@comcast.com>
brian d foy wrote:
> In article <slrnd633e8.1am.tassilo.von.parseval@localhost.localdomain>,
> Tassilo v. Parseval <tassilo.von.parseval@rwth-aachen.de> wrote:
>
>> Also sprach brian d foy:
>> > In article <ctednT0c5q66nsLfRVn-3w@comcast.com>, Chris Mattern
>> ><matternc@comcast.net> wrote:
>
>> >> I did say *often*, not *always*. Of course, anybody doing tasks
>> >> with hard real-time requirements in Perl is certifiable.
>
>> > Certifiably what? I do things with hard real-time requirements
>> > in Perl.
>
>> I strongly doubt that. Perl is inherently unsuitable for those kind of
>> tasks. Most languages and environments in fact are.
>
> Maybe someone should define some terms then, because we haven't
> talked about anything specific, but everyone seems to think we're
> talking about something specific. :)
>
We are talking about something specific. Hard real time programming
is programming in an environment with exact and rigorous timing
requirements (like setting off an airbag). In such an environment,
you may have, for example, a requirement that action A happen 342
milliseconds after event B is detected, plus or minus 3 milliseconds.
Violating that requirement by letting action A happen 334 milliseconds
after, or 348 milliseconds, is not acceptable and will cause the device
you are programming to fail. You must program to ensure that that does
not happen. You cannot write such programs in Perl, nor can you write
them on a general use OS like standard Linux (there is a real-time
Linux kernel mod, though).
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
Date: Sun, 17 Apr 2005 01:10:02 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: LWP
Message-Id: <zJCdnazAoos2cvzfRVn-1Q@adelphia.com>
freedom wrote:
(At the top - please don't do that.)
> "Sherm Pendley" <spamtrap@dot-app.org> wrote in message
> news:pPGdnZmpM4lWRvzfRVn-iQ@adelphia.com...
>
>>freedom wrote:
>>
>>>is there anyway to get url whatever the user entered in the field.
>>>
>>It depends. What kind of field? An HTML form? A Tk interface? Curses, Gtk,
>>Qt, Cocoa... what?
> it is an html form
CGI.pm is the standard way to retrieve the contents of a form that's
been submitted to a CGI script written in Perl. For example, to retrieve
the contents of a form input named "example":
#!/usr/bin/perl
use warnings;
use strict;
use CGI;
my $query = new CGI;
my $example = $query->param('example');
# Obviously you'd want to follow this with some output at
# this point. :-)
Have a look at "perldoc CGI" for more.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: 17 Apr 2005 10:52:54 -0700
From: mike_solomon@lineone.net (Mike Solomon)
Subject: Re: memory leak in loop
Message-Id: <56568be5.0504170952.43c93c7a@posting.google.com>
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message news:<42606ee2$0$5394$afc38c87@news.optusnet.com.au>...
> "Mike Solomon" <mike_solomon@lineone.net> wrote in message
> news:56568be5.0504150854.4b74f777@posting.google.com...
> > Using the following code I get a memory leak
> >
> > I am using ActiveState Perl 5.8.0 on Windows
> >
> > I suspect it is caused by Xbase
> >
> > Any ideas to fix it would be much appreciated
> >
> > use strict;
> > use XBase;
> >
>
> That module has not been updated on cpan in over 9 years. Maybe try using
> DBD::Xbase instead. (It's available as a ppm from ActiveState.)
>
> Cheers,
> Rob
Same problem with DBD:Xbase I'm afraid
------------------------------
Date: Sun, 17 Apr 2005 06:46:53 -0400 (EDT)
From: "Agent 69" <69-no-spam@69.69.69.69.invalid>
Subject: On the computer -- a help or hinderance?
Message-Id: <cDIzMTA=.d28f22c76e4a82c7fc5c4ff6bd9c017a@1113734813.nulluser.com>
Si <mymatesi@CHINESEgmail.com> of BT Openworld wrote in alt.drugs.hard
in article <d3s1u3$kl3$1@sparta.btinternet.com>:
>Justin wrote:
>> hey i use about 120 mg's of hydrocodone a day and about a week and a
>> half ago i was in the shower and it felt like i got water stuck in my
>> ear. i tried and tried to get the water out but it wouldnt come out.
>> started hurting pretty bad. couldnt hear shit. it doesnt hurt as
much
>> but my hearing is still only about 30% in that ear. i heard about
>> people going deaf on hydrocodone. does anyone have experience with
>> this? will my hearing return if i quit for a while?
>>
>> all i been doing lately is eating norcos and playing internet poker
and
>> xbox live:)
>>
>I think I read it was more likely tha APAP that can cause problems
with
>hearing than the hydro. have you been to the docs and tried having
your
>ears syringed ? Could be there is a blockage of waz and the water has
>got behind it.
>
>Internet Poker and Xbox Live, nothing wrong with that. Opiates
gambling
>and gaming three of my favourite hobbies.
>
>Si
I am wondering what everyone's experiences with narcotics and video
games and poker and so forth are, both from an enjoyment and an
accuracy standpoint.
I will start: Everything I enjoy better on most narcotics, and rarely
notice more than a slight increase in typing speed and accuracy (I once
went from 59 to 77 wpm with one error in both cases on a 10-minute
typing test back in the day a half-hour after shooting M) and I am
especially fond of the combinations of:
* morphine and Tetris,
* hydromorphone or oxymorphone and newsgroups,
* hydromorphone or hydrocodone and spreadsheets and Perl programming
(BTW, avoid programming in C or assembly language if you are drunk or
blasted on barbs or meprobamate/Carisoprodol)
* one of the above, nicomorphine, or especially oxycodone and Sonic The
Hedgehog.
OTOH, I feel impaired (sluggish etc.) playing any of the Grand Theft
Auto variants on anything but oxycodone.
I would like to play Sly Raccoon on M some time soon. Come to think of
it, why don't they make a video game about a raccoon who has to steal
morphine and shit -- like a cross betwixt Sly Raccoon, GTA, and the
film Drugstore Cowboy? It would be a giant hit!
What would narcotics and/or what they can do have as effects for the
poker player or other gambler of various types, ranging from lottery
scratch-off enthusiasts to hard-core roulette or horse-racing folks?
---
Agent 69
alt.drugs.hydromorphone
That's my level best & two lipa and/or €0,02 and anyone who doesn't
like it can suck my arsehole.
(938.txt)
------------------------------
Date: Sun, 17 Apr 2005 15:52:00 GMT
From: jim jowski <backhaul14@sbcglobal.net>
Subject: outputting the results of something.pl
Message-Id: <ACv8e.44$Xb4.41@newssvr21.news.prodigy.com>
I've written an html form that will pass three values to a script called
'something.pl' which lives in my cgi-bin directory. When something.pl
is executed; I get the following error message:
[Sun Apr 17 08:24:37 2005] [error] [client 127.0.0.1] malformed header
from script. Bad header=<html><head><title>the title</:
/var/www/cgi-bin/something.pl
'something.pl' is nothing more than:
#!/usr/bin/perl
$dollar0 = @ARGV[0];
$dollar1 = @ARGV[1];
$dollar2 = @ARGV[2];
print "<html><head><title>the title</title></head>";
print "<body><p>dollar0 = $dollar0\n";
print "<p>\tdollar1 = $dollar1\n";
print "<p>\t\tdollar2 = $dollar2\n";
print "</body></html>";
and the html form that calls 'something.pl' is:
<html><head><title>input</title></head>
<body><form method="post" action="/cgi-bin/something.pl">
<P>value 0: <input type="text" name="v0" size=10></p>
<P>value 1: <input type="text" name="v1" size=10></p>
<P>value 2: <input type="text" name="v2" size=10></p>
<P><input type="submit" name="submit" value="calculate"></P>
</form>
</body>
</html>
I know that I can do all this with PHP but I have too much time invested
in perl code that I can clone to migrate. Once I have this simple
output problem solved, I can hopefully do the rest of the project this week.
Thanks,
Jim
------------------------------
Date: Sun, 17 Apr 2005 17:31:24 +0100
From: Brian Wakem <no@email.com>
Subject: Re: outputting the results of something.pl
Message-Id: <3cfhatF6nrj6fU1@individual.net>
jim jowski wrote:
> I've written an html form that will pass three values to a script called
> 'something.pl' which lives in my cgi-bin directory. When something.pl
> is executed; I get the following error message:
>
> [Sun Apr 17 08:24:37 2005] [error] [client 127.0.0.1] malformed header
> from script. Bad header=<html><head><title>the title</:
> /var/www/cgi-bin/something.pl
You need to print a content type header first.
print "Content-type: text/html\n\n";
--
Brian Wakem
------------------------------
Date: 17 Apr 2005 09:36:20 -0700
From: "John" <jfcampbell@aol.com>
Subject: Re: outputting the results of something.pl
Message-Id: <1113755780.412801.88470@g14g2000cwa.googlegroups.com>
Maybe you need to backquote or escape-out the slashes in your literal
instead of:
<title>the title</title>
maybe:
<title>the title<\/title>
------------------------------
Date: Sun, 17 Apr 2005 01:19:15 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: parsing directory
Message-Id: <_aGdnZrYv9ZObPzfRVn-1A@adelphia.com>
freedom wrote:
(At the top. Please don't do that.)
> "Sherm Pendley" <spamtrap@dot-app.org> wrote in message
> news:pPGdnZ6pM4nSRvzfRVn-iQ@adelphia.com...
>
>>ozgur teksin wrote:
>>
>>
>>>i m newbie in perl so i was trying to figure out how to parse filename
>>>directory in the form field when the user submit it.
>>
>>It depends. What kind of form field? An HTML form? A Tk interface? Curses,
>>Gtk, Qt, Cocoa... what?
>>
> html form
The docs for CGI.pm have quite a bit to say about uploading files. One
of the things it says is that the file name you get back will vary with
the browser being used - some return the full path, others just the file
name.
Have you read the posting guidelines for this group? They include a
number of helpful tips for beginners.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sun, 17 Apr 2005 09:06:44 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: parsing directory
Message-Id: <3ceg76F6m4mj2U1@individual.net>
Sherm Pendley wrote:
> freedom wrote:
>> Sherm Pendley wrote:
>>> ozgur teksin wrote:
>>>> i m newbie in perl so i was trying to figure out how to parse
>>>> filename directory in the form field when the user submit it.
>>>
>>> It depends. What kind of form field? An HTML form? A Tk interface?
>>> Curses, Gtk, Qt, Cocoa... what?
>>>
>> html form
>
> The docs for CGI.pm have quite a bit to say about uploading files.
Did the OP ask about file uploads? In that case, the CPAN module
CGI::UploadEasy might be helpful.
http://search.cpan.org/perldoc?CGI%3A%3AUploadEasy
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sun, 17 Apr 2005 07:24:03 +0200
From: Bo Lindbergh <blgl@hagernas.com>
Subject: Re: Parsing user-entered content to remove rude words
Message-Id: <blgl-A01CFC.07240317042005@news.bahnhof.se>
See also: <http://www.netfunny.com/rhf/jokes/99/Dec/censorship.html>
/Bo Lindbergh
------------------------------
Date: 17 Apr 2005 15:32:14 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Parsing user-entered content to remove rude words
Message-Id: <d3tvhu$7l7$1@mamenchi.zrz.TU-Berlin.DE>
Greg <gmills@nilELEPHANTdram.com> wrote in comp.lang.perl.misc:
> > Not quite -- some points, though:
> > - s// is substituting, whereas you only need matching (m//, or just //)
>
> Yeah, It's <cough> pseudocode - just a typo on my part - but thanks for
> noticing :D
Labelling something "pseudocode" is not a license to write anything
you please and let the reader figure it out. "s//" is nonsense,
pseudocode or not.
Anno
------------------------------
Date: Sun, 17 Apr 2005 23:18:36 +1000
From: Paul <none@none>
Subject: Perl HTML::TableExtract Question
Message-Id: <4262622c$0$12413$afc38c87@news.optusnet.com.au>
Hi !
I hope someone can help.
I want to extract data from a table with 2 columns.
A sample of the table can be generated with:-
"http://moneycentral.msn.com/investor/research/sreport.asp?Symbol=ba&QD=1&OP=1&IC=1&Y1=1&CR=1&AF=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity"
(Sorry about the long URL :-) )
What I want is the field from the top table Labelled - "Tot. Shares Out."
My Current Code is :-
#!/usr/bin/perl -w
use strict;
use HTML::TableExtract;
my $inFile = "/home/mas/development/URLTemp.tmp";
my $te = HTML::TableExtract->new( headers => [ 'Fundamental Data', '*' ]);
$te->parse_file( $inFile );
foreach my $ts ( $te->table_states ) {
foreach my $row ( $ts->rows ) {
print join( ",", @$row, "," ), "\n";
}
}
But this seems to get the table lower down the page. This wouldn't be so
bad as it has the value I need repeated but - "How do I get an
un-labelled column ????"
Any help would be appreciated.
Paul
------------------------------
Date: Sun, 17 Apr 2005 23:27:23 +1000
From: Paul <none@none>
Subject: Re: Perl HTML::TableExtract Question
Message-Id: <42626440$0$5397$afc38c87@news.optusnet.com.au>
Paul wrote:
> Hi !
>
> I hope someone can help.
>
> I want to extract data from a table with 2 columns.
>
> A sample of the table can be generated with:-
>
> "http://moneycentral.msn.com/investor/research/sreport.asp?Symbol=ba&QD=1&OP=1&IC=1&Y1=1&CR=1&AF=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity"
>
>
> (Sorry about the long URL :-) )
>
> What I want is the field from the top table Labelled - "Tot. Shares Out."
>
> My Current Code is :-
>
> #!/usr/bin/perl -w
>
>
> use strict;
> use HTML::TableExtract;
>
>
> my $inFile = "/home/mas/development/URLTemp.tmp";
> my $te = HTML::TableExtract->new( headers => [ 'Fundamental Data', '*' ]);
> $te->parse_file( $inFile );
> foreach my $ts ( $te->table_states ) {
> foreach my $row ( $ts->rows ) {
> print join( ",", @$row, "," ), "\n";
> }
> }
>
>
> But this seems to get the table lower down the page. This wouldn't be so
> bad as it has the value I need repeated but - "How do I get an
> un-labelled column ????"
>
> Any help would be appreciated.
>
> Paul
Just a bit more info on this - the ", '*'" doesn't work - in fact it
returns empty data. Without it it assumes that the rows below are what
is wanted and it returns:-
Market Capitalization,,
Earnings/Share,,
The real question is "How do I specify a row with a NULL header ??
------------------------------
Date: Sun, 17 Apr 2005 10:47:16 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl HTML::TableExtract Question
Message-Id: <slrnd65183.uje.tadmc@magna.augustmail.com>
Paul <none@none> wrote:
> What I want is the field from the top table Labelled - "Tot. Shares Out."
> my $te = HTML::TableExtract->new( headers => [ 'Fundamental Data', '*' ]);
The headers approach will not work since there are no headers
on the table that contains the data that you are after.
> "How do I get an
> un-labelled column ????"
Positionally.
"Tot. Shares Out." is the 7th column in the 12th row of the table
at depth=2 and count=1.
> Any help would be appreciated.
my $te = HTML::TableExtract->new( depth => 2, count => 1);
my $total_outstanding = ($ts->rows)[11]->[6];
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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 7984
***************************************