OO - Cgi-param not working with inheritance

2009-02-24 Thread Brent Clark
Hiya I im new to the perl OO ways. I got my package as so. package htmlhandler; use strict; use Data::Dumper; use CGI; my $cgi = new CGI; our @ISA = qw(CGI); sub new { my ($class, $self) = @_; my $self = {}; bless $self, $class; } The problem I find is that, I have and that I cant

Email Purge

2009-02-24 Thread perl
Cheers and thanks in advance for you help. I have a routine intended to purge duplicate emails from a list. The code below is not working. I remember seeing something like... foreach $email(@emails, @emails2)) { etc ... but I'm lost. Any help is appreciated. sub purge { open (LIST, $list) or

AW: Email Purge

2009-02-24 Thread Thomas Bätzler
perl t...@asgweb.net wrote: Cheers and thanks in advance for you help. I have a routine intended to purge duplicate emails from a list. The code below is not working. I remember seeing something like... foreach $email(@emails, @emails2)) { etc ... but I'm lost. Any help is appreciated. This

Re: OO - Cgi-param not working with inheritance

2009-02-24 Thread Brent Clark
Chas. Owens wrote: On Tue, Feb 24, 2009 at 03:20, Brent Clark brentgclarkl...@gmail.com wrote: snip Thank you. I understand and its working now ( even a few lines less ;) ). Kind Regards Brent Clark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

RE: Query in Perl Programming

2009-02-24 Thread S, Rajini (STSD)
My code in the program is : use strict; use warnings; use Time::Local; my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('16-Feb-09'); my $day = $days2 - $days1; print Difference: @{[$days2 - $days1]} days\n; BEGIN { my %month_num = do { my $n = 0; map(($_, $n++),

RegExp Problem using Substitutions.

2009-02-24 Thread Deviloper
Hi there! I have a string bbbababbaaassass. I want to get a string without any double a 'aa' or and without the 'b's. but if I do: my $s = bbbababbaaassass; $s=~ s/aa|b//g; as a result I will get a string aaassass. (I understand WHY I get this result. But I don´t know how to avoid

Re: flattening @AoA

2009-02-24 Thread rob
hi i think i made a bit of a mess explaining my problem so i am going to have another attempt :) use Math::Combinatorics; #this is where permute comes form my @phraseA = (%1\$s'16-^\\markup {\A\} , %2\$s16- , %3\$s16- ); my @phraseB = (%4\$s'''4-.^\\markup {\B\} , %5\$s8-. , %6\$s8-. ); my

RE: RegExp Problem using Substitutions.

2009-02-24 Thread ramesh.marimuthu
Try this: $s=~s/b|ab*a//g; -Original Message- From: Deviloper [mailto:devilo...@slived.net] Sent: Tuesday, February 24, 2009 4:03 PM To: beginners@perl.org Subject: RegExp Problem using Substitutions. Hi there! I have a string bbbababbaaassass. I want to get a string without any

Re: RegExp Problem using Substitutions.

2009-02-24 Thread John W. Krahn
Deviloper wrote: Hi there! Hello, I have a string bbbababbaaassass. I want to get a string without any double a 'aa' or and without the 'b's. but if I do: my $s = bbbababbaaassass; $s=~ s/aa|b//g; as a result I will get a string aaassass. (I understand WHY I get this result. But

Re: RegExp Problem using Substitutions.

2009-02-24 Thread John W. Krahn
John W. Krahn wrote: Deviloper wrote: Hi there! Hello, I have a string bbbababbaaassass. I want to get a string without any double a 'aa' or and without the 'b's. but if I do: my $s = bbbababbaaassass; $s=~ s/aa|b//g; as a result I will get a string aaassass. (I understand WHY I

Re: flattening @AoA

2009-02-24 Thread Rob Dixon
r...@goto10.org wrote: hi i think i made a bit of a mess explaining my problem so i am going to have another attempt :) use Math::Combinatorics; #this is where permute comes form my @phraseA = (%1\$s'16-^\\markup {\A\} , %2\$s16- , %3\$s16- ); my @phraseB = (%4\$s'''4-.^\\markup {\B\}

Re: RegExp Problem using Substitutions.

2009-02-24 Thread Rob Dixon
Deviloper wrote: Hi there! I have a string bbbababbaaassass. I want to get a string without any double a 'aa' or and without the 'b's. but if I do: my $s = bbbababbaaassass; $s=~ s/aa|b//g; as a result I will get a string aaassass. (I understand WHY I get this result.

Re: OO - Cgi-param not working with inheritance

2009-02-24 Thread Dermot
2009/2/24 Brent Clark brent...@gmail.com: Chas. Owens wrote: On Tue, Feb 24, 2009 at 03:20, Brent Clark brentgclarkl...@gmail.com wrote: snip Thank you. I understand and its working now ( even a few lines less ;) ). Perhaps it's just me, but I can't find Chas's response in the archive.

Re: Email Purge

2009-02-24 Thread Jenda Krynicky
From: perl t...@asgweb.net Cheers and thanks in advance for you help. I have a routine intended to purge duplicate emails from a list. The code below is not working. I remember seeing something like... foreach $email(@emails, @emails2)) { etc ... but I'm lost. Any help is appreciated. sub

How to handle pop up to enter authentication credentials

2009-02-24 Thread Sarsamkar, Paryushan
Hi All, While running my perl script (which run some commands in my application) I get a authentication popup which is java applet and I would like to handle that to enter user name and password so that rest of the command gets executed. Is there any way to do that? Thanks, Paryushan

Re: Query in Perl Programming

2009-02-24 Thread Chas. Owens
On Tue, Feb 24, 2009 at 04:58, S, Rajini (STSD) rajin...@hp.com wrote: My code in the program is : use strict; use warnings; use Time::Local; my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('16-Feb-09'); my $day = $days2 - $days1; print Difference: @{[$days2 - $days1]}

Re: Email Purge

2009-02-24 Thread Gunnar Hjalmarsson
perl wrote: Cheers and thanks in advance for you help. I have a routine intended to purge duplicate emails from a list. The code below is not working. I gave you a tip att beginners-cgi: perldoc -q duplicate but you seem to have ignored it. Why? -- Gunnar Hjalmarsson Email:

Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Dennis G. Wicks
Greetings; Here's the code: - #!/usr/bin/perl use strict; use warnings; use Mail::Builder::Simple; my $mail = Mail::Builder::Simple-new; # Send the email with an SMTP server: $mail-send( mail_client = { mailer =

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Octavian Râsnita
From: Dennis G. Wicks dgwi...@gmail.com Greetings; #!/usr/bin/perl use strict; use warnings; use Mail::Builder::Simple; my $mail = Mail::Builder::Simple-new; # Send the email with an SMTP server: $mail-send( mail_client = { mailer = 'SMTP', mailer_args = [

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Gunnar Hjalmarsson
Octavian Râsnita wrote: From: Dennis G. Wicks dgwi...@gmail.com Greetings; snip Lacking any problems with the code, does anybody have any ideas about what may be stopping this from working? The code looks fine. There could be the following problems: - If you have the SMTP server locally,

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Dennis G. Wicks
Gunnar Hjalmarsson wrote the following on 02/24/2009 12:41 PM: Octavian Râsnita wrote: From: Dennis G. Wicks dgwi...@gmail.com Greetings; snip Lacking any problems with the code, does anybody have any ideas about what may be stopping this from working? The code looks fine. There could be

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Octavian Râsnita
From: Gunnar Hjalmarsson nore...@gunnar.cc Octavian Râsnita wrote: From: Dennis G. Wicks dgwi...@gmail.com Greetings; snip Lacking any problems with the code, does anybody have any ideas about what may be stopping this from working? The code looks fine. There could be the following

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Gunnar Hjalmarsson
Dennis G. Wicks wrote: But I think I have discovered the problem. The SMTP server requires a non-standard port. I have searched the doc and I don't find anything that tells me how to pass a port # to the module. Anybody know how to do that? I don't; the below suggestion is merely a shot in

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Octavian Râsnita
From: Dennis G. Wicks dgwi...@gmail.com But I think I have discovered the problem. The SMTP server requires a non-standard port. I have searched the doc and I don't find anything that tells me how to pass a port # to the module. Anybody know how to do that? (BTW: Everything else is set up

Re: Query in Perl Programming

2009-02-24 Thread Owen
On Tue, 24 Feb 2009 09:58:00 + S, Rajini (STSD) rajin...@hp.com wrote: My code in the program is : That all seems to work. If you ever have problems getting a program to work, it is often advisable to add some debugging aids, and I have added a few to your code below so you might get the

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Gunnar Hjalmarsson
Octavian Râsnita wrote: From: Gunnar Hjalmarsson nore...@gunnar.cc Octavian Râsnita wrote: There could be the following problems: - If you have the SMTP server locally, it doesn't require authentication, or - The username should not be t...@mgssub.com but only tfrg, or - The server requires

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Octavian Râsnita
From: Gunnar Hjalmarsson nore...@gunnar.cc however until that new module will be ready... I need to use Email::Send, because it allows sending in many ways, using SMTP, Sendmail, Qmail, Google and a few others. Why is it important to have a mail sending module hunt for various mailer

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Dennis G. Wicks
[Cleaned out previous stuff] Greetings; Well, I tried to attach the port to the server address, Host = 'smtpout.secureserver.net:3535', but that doesn't work either. Maybe there is something else setup wrong that I'm not seeing. I also was going to try Mail::Sender but I can't get a

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Gunnar Hjalmarsson
Octavian Râsnita wrote: From: Gunnar Hjalmarsson nore...@gunnar.cc however until that new module will be ready... I need to use Email::Send, because it allows sending in many ways, using SMTP, Sendmail, Qmail, Google and a few others. Why is it important to have a mail sending module hunt

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Octavian Râsnita
From: Gunnar Hjalmarsson nore...@gunnar.cc Well, if I understand it correctly, Mail::Builder::Simple *enforces* the use of UTF-8, which is something I don't like. Well, I like that, because it is more simple to send special chars from more languages, but without needing to know nor to specify

Re: Sending email w/Mail::Builder::Simple -- need help

2009-02-24 Thread Octavian Râsnita
From: Dennis G. Wicks dgwi...@gmail.com [Cleaned out previous stuff] Greetings; Well, I tried to attach the port to the server address, Host = 'smtpout.secureserver.net:3535', but that doesn't work either. Maybe there is something else setup wrong that I'm not seeing. I see the word