Re: hashref ref ref slice

2006-05-02 Thread Karjala
Try this: map {$_->{text}} @[EMAIL PROTECTED] Ryan Perry wrote: @[EMAIL PROTECTED]>{text} I want to get all the "text" values for a set of keys in a hashref, but the above code always gives me only the first in @sortedkeys. Thanks for any assistance! Ryan --To unsubscribe, e-mail: [EMAIL P

Re: using "our" across blocks

2006-05-02 Thread Anthony Ettinger
. On 5/2/06, Charles K. Clarkson <[EMAIL PROTECTED]> wrote: Anthony Ettinger wrote: : #!/usr/bin/perl -w : : use vars qw($start_time $end_time); : use strict; : : BEGIN { : $start_time = time(); : } : : sub log_time { : my $exit_code = shift; : my $elapsed_time = $end_

hashref ref ref slice

2006-05-02 Thread Ryan Perry
@[EMAIL PROTECTED]>{text} I want to get all the "text" values for a set of keys in a hashref, but the above code always gives me only the first in @sortedkeys. Thanks for any assistance! Ryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: using "our" across blocks

2006-05-02 Thread Charles K. Clarkson
Anthony Ettinger wrote: : #!/usr/bin/perl -w : : use vars qw($start_time $end_time); : use strict; : : BEGIN { : $start_time = time(); : } : : sub log_time { : my $exit_code = shift; : my $elapsed_time = $end_time - $start_time; : : print $elapsed_time, "\n"; :

Re: [OT] I give up with the reply-to business already

2006-05-02 Thread Dr.Ruud
(Randal L. Schwartz) schreef: > If you want to do duplicate rejection, please note that every message > contains a message-id that is unique per message. I reject > duplicates via procmail. You can do the same. I prefer to filter out the author's email address from my follow-up, if the message a

Re: using "our" across blocks

2006-05-02 Thread Anthony Ettinger
On 5/2/06, Charles K. Clarkson <[EMAIL PROTECTED]> wrote: Anthony Ettinger wrote: : #!/usr/bin/perl -w : : use vars qw($foo); #globals; : use strict; : : sub foo { : $foo = 'foo'; : my $baz = 'baz'; : } : : my $baz = 'pre-baz'; : foo(); : : print $foo, "\n"; : print $baz, "\n";

Re: HTML to Text

2006-05-02 Thread Paul Johnson
On Tue, May 02, 2006 at 04:43:34PM -0500, JupiterHost.Net wrote: > >Basically, right now I just need the HTML to Text output, like I explained. > "I want to grab strings between the p tags in this exact block of HTML" > > to which I would reply: > > my @strings = $html =~ m{(.*)}g; Yeah. Depe

[merlyn.'[EMAIL PROTECTED]: Re: [OT] I give up with the reply-to business already]

2006-05-02 Thread Chad Perrin
- Forwarded message from The Answering Machine - Envelope-to: [EMAIL PROTECTED] Delivery-date: Tue, 02 May 2006 15:21:57 -0700 From: The Answering Machine Subject: Re: [OT] I give up with the reply-to business already To: [EMAIL PROTECTED] X-Antivirus-Scanner: Clean mail though you shou

RE: using "our" across blocks

2006-05-02 Thread Charles K. Clarkson
Anthony Ettinger wrote: : #!/usr/bin/perl -w : : use vars qw($foo); #globals; : use strict; : : sub foo { : $foo = 'foo'; : my $baz = 'baz'; : } : : my $baz = 'pre-baz'; : foo(); : : print $foo, "\n"; : print $baz, "\n"; I think the problem we are having is why use a solut

Re: HTML to Text

2006-05-02 Thread JupiterHost.Net
Your specification is incomplete. It is simple, not incomplete. Actually it was ambiguous :) Se below to see what I mean (and probably what the post that said it was incomplete meant) What if it says: Data that I need Do you want in your response? Or stripped? Or that part of i

RE: CGI/Includes question

2006-05-02 Thread Charles K. Clarkson
Steve Gross wrote: : The problem is that the .shtml file contains includes. When my : template->out method calls the .shtml file, the includes are simply : passed along and not parsed. Use a redirect. Create the .shtml file with your program and then redirect to that .shtml file. Apache will

Re: using "our" across blocks

2006-05-02 Thread Anthony Ettinger
On 5/2/06, Jay Savage <[EMAIL PROTECTED]> wrote: On 5/2/06, Anthony Ettinger <[EMAIL PROTECTED]> wrote: > I want to double-check that it is correct to use "our" to import globals. > [snip] What do you mean by import? Variables aren't imported from BEGIN blocks. They're declared in BEGIN blocks,

Re: using "our" across blocks

2006-05-02 Thread Jay Savage
On 5/2/06, Anthony Ettinger <[EMAIL PROTECTED]> wrote: I want to double-check that it is correct to use "our" to import globals. [snip] What do you mean by import? Variables aren't imported from BEGIN blocks. They're declared in BEGIN blocks, and a variable declared in a BEGIN block should be

Re: HTML to Text

2006-05-02 Thread Scott Taylor
On Tue, May 2, 2006 12:55, Randal L. Schwartz wrote: >> "Scott" == "Scott Taylor" <[EMAIL PROTECTED]> writes: > > Scott> my simple input file will look like this: > > Scott> > Scott> > Scott> Bin Server > Scott> > Scott> > Scott> Data that I need > Scott> Data that I need > Scott> > Sc

RE: HTML to Text

2006-05-02 Thread Scott Taylor
On Tue, May 2, 2006 13:45, Russ Foster wrote: >> -Original Message- >> >> >> >> Bin Server >> >> >> Data that I need >> Data that I need >> >> >> >> I want the output to just be lines of "Data that I need" stored in a >> string, that I can work on each line one at a time, or in an

RE: HTML to Text

2006-05-02 Thread Russ Foster
> -Original Message- > > > > Bin Server > > > Data that I need > Data that I need > > > > I want the output to just be lines of "Data that I need" stored in a > string, that I can work on each line one at a time, or in an array or > something like that would be great. I would fir

Re: using "our" across blocks

2006-05-02 Thread Ricardo SIGNES
* Anthony Ettinger <[EMAIL PROTECTED]> [2006-05-02T15:04:53] > I want to double-check that it is correct to use "our" to import globals. > > BEGIN { >our $foo = 'foo'; > } > > sub something { >our $foo; >our $bar; > } > [ ... ] > Is this the correct way to import globals? Yes, if by

CGI/Includes question

2006-05-02 Thread Steve Gross
I have an html file that contains a form. The form's action method calls my Perl program which collects some data and then feeds it via HTML-Template to an .shtml file. I'm using an apache webserver on Windows that has SSI enabled. The problem is that the .shtml file contains includes. When my

Re: HTML to Text

2006-05-02 Thread Randal L. Schwartz
> "Scott" == "Scott Taylor" <[EMAIL PROTECTED]> writes: Scott> my simple input file will look like this: Scott> Scott> Scott> Bin Server Scott> Scott> Scott> Data that I need Scott> Data that I need Scott> Scott> Scott> I want the output to just be lines of "Data that I need" stored

Re: Re: [OT] I give up with the reply-to business already @ 1146598876

2006-05-02 Thread Johan Meskens CS3 jmcs3
Intrah onat Diria .. 02 May 2006 12:30:05 -0700 , ** wrote "Noalim y": > That's another objection I had in reading the replies to this thread: the > *list* never sends a message. *People* send messages. So the "From" and > "reply-to" should never be an mechanical list resending mecha

Re: [OT] I give up with the reply-to business already

2006-05-02 Thread Randal L. Schwartz
> "Russ" == Russ Foster <[EMAIL PROTECTED]> writes: Russ> That means if you want to reply to just the list, you have to make a Russ> manual effort to delete everyone else's address. *But* you can't do that. Suppose I'm sending to perl-beginners, and also cc'ing a few of my expert friends who

HTML to Text

2006-05-02 Thread Scott Taylor
Hello all, I have an HTML file that I need to extract the text data from. What modules do I need to be able to do this? I was looking at HTML::Parser but it doesn't make any sense and probably not what I'm looking for. my simple input file will look like this: Bin Server Data that I nee

using "our" across blocks

2006-05-02 Thread Anthony Ettinger
I want to double-check that it is correct to use "our" to import globals. #!/usr/bin/perl -w use strict; BEGIN { our $foo = 'foo'; } sub something { our $foo; our $bar; ...at this point I can see 'foo' and 'bar' values. } END { our $bar = 'bar'; } If I do *not* import with "our

Re: [OT] I give up with the reply-to business already

2006-05-02 Thread Chad Perrin
On Tue, May 02, 2006 at 08:28:06AM -0400, Ryan Frantz wrote: > > > -Original Message- > > From: Chad Perrin [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, May 02, 2006 4:37 AM > > To: Mr. Shawn H. Corey > > Cc: Chad Perrin; beginners@perl.org > > Subject: Re: [OT] I give up with the reply-to

RE: [OT] I give up with the reply-to business already

2006-05-02 Thread Russ Foster
On Tue, 2 May 2006, Ryan Frantz wrote: > > -Original Message- > > From: Chad Perrin [mailto:[EMAIL PROTECTED] > > > > Please refrain from sending me two copies of an email. If it goes to > > the list, I'll get it. There's no need to include my private email > > address if you're also se

Re: Dynamically Created If Statment

2006-05-02 Thread JupiterHost.Net
Is there a better way to create dynamic if structures on the fly that i am not aware of? Sure, use code refs instead of eval -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: CGI - Tables and Stylesheet

2006-05-02 Thread Charles K. Clarkson
Mark Martin wrote: : I'm new to stylesheets - currently my html report picks the : style for a table from the stylesheet but I have a number : of table printing on my html report and I'd like to format : each differently. : : here's the table code : : [snip code] Okay, so what is your ques

Re: What is the function of BEGIN in perl

2006-05-02 Thread chen li
Thanks very much for Anthiny and others for the explanation. Li --- Anthony Ettinger <[EMAIL PROTECTED]> wrote: > basically, BEGIN { } is a block which gets called > whenever the script > begins. > > > > On 5/1/06, chen li <[EMAIL PROTECTED]> wrote: > > > > Dear all, > > > > Recently I read s

Dynamically Created If Statment

2006-05-02 Thread Jonathon Wyza
Currently i am doing something like this $detail_def{1}{stmt}="\$data{\$key}{sex} eq \"F\" && \$data{\$key}{yr} == \$year && \$data{\$key}{INQUIR1} eq \"INQUIR-1\""; $detail_def{2}{stmt}="\$data{\$key}{sex} eq 'M' && \$data{\$key}{yr}==\$year && \$data{\$key}{INQUIR1} eq \"INQUIR-1\""; >

CGI - Tables and Stylesheet

2006-05-02 Thread Mark Martin
Hi, I'm new to stylesheets - currently my html report picks the style for a table from the stylesheet but I have a number of table printing on my html report and I'd like to format each differently. here's the table code : print table({-border=>undef}, Tr({-align=>CENTER,-valign=>TOP

Re: hash keys

2006-05-02 Thread Jay Savage
On 5/2/06, Rance Hall <[EMAIL PROTECTED]> wrote: the set of hash keys is what the computer uses to find values in the hash, and in order to optimize your code and make searching the hash for specific values as fast as possible, you should WANT your key to be as short and simple as possible but s

Re: hash keys

2006-05-02 Thread Rance Hall
Ryan Perry wrote: Generally, your hash value is larger than you key ( $hash{key}="Some text, maybe a sentence or two"). Is there any reason I should not reverse this relationship? ($hash{"Some text, maybe a sentence or two"}='key') Thanks! the set of hash keys is what the com

Re: LWP debug

2006-05-02 Thread Peter Scott
On Tue, 02 May 2006 13:06:56 +0200, luis wrote: > the following code is part of a bigger script. I would like to know if > there is a way to print out or store into a file all the messages that > my script sends to the server, I mean, the full header and data parts > sent to the server, in order to

RE: [OT] I give up with the reply-to business already

2006-05-02 Thread Ryan Frantz
> -Original Message- > From: Chad Perrin [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 02, 2006 4:37 AM > To: Mr. Shawn H. Corey > Cc: Chad Perrin; beginners@perl.org > Subject: Re: [OT] I give up with the reply-to business already > > Please refrain from sending me two copies of an ema

LWP debug

2006-05-02 Thread luis
Hi, the following code is part of a bigger script. I would like to know if there is a way to print out or store into a file all the messages that my script sends to the server, I mean, the full header and data parts sent to the server, in order to debug my application. -

LWP debug

2006-05-02 Thread luis
Hi, the following code is part of a bigger script. I would like to know if there is a way to print out or store into a file all the messages that my script sends to the server, I mean, the full header and data parts sent to the server, in order to debug my application. -

Re: Java/Perl

2006-05-02 Thread Todd W
"Karjala" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Has anyone used the "Java" module successfully in Perl? State University of New York at Buffalo has: http://www.perl.com/pub/a/2004/12/09/epayment.html Todd W. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: [OT] I give up with the reply-to business already

2006-05-02 Thread Chad Perrin
On Mon, May 01, 2006 at 07:24:12PM -0400, Mr. Shawn H. Corey wrote: > On Mon, 2006-01-05 at 17:06 -0600, Chad Perrin wrote: > > In other words, I don't think blaming choice of mail client or mail user > > agent helps anything, especially since in many cases work conditions may > > dictate one's cho