Re: Net::SMTP and MIME::Base64

2005-08-26 Thread $Bill Luebkert
Ken Barker wrote: > I am attempting to attach multiple spreadsheets to an e-mail. I can get it > to work fine for a single attachment but do not understand what parameters I > am missing to attach the subsequent files. > > Here is what works for a single: Here is the same code sending two dupl

Re:Net::SMTP and MIME::Base64

2005-08-26 Thread Solli Moreira Honorio
try something like this : use MIME::Lite; use strict; use warnings; eval { send_email ($smtpserver, $sender, [EMAIL PROTECTED], $subject, $body, [EMAIL PROTECTED] ) }; print "Error: $@" if ( $@ ); sub send_email { my ( $smtp, $sender, $destination, $subject, $body, $attachme

Net::SMTP and MIME::Base64

2005-08-26 Thread Ken Barker
I am attempting to attach multiple spreadsheets to an e-mail. I can get it to work fine for a single attachment but do not understand what parameters I am missing to attach the subsequent files. Here is what works for a single: use Net::SMTP; use MIME::Base64; $excel_file1 = 'yourexcelfile.x

Re: Metacharacters

2005-08-26 Thread Chris . McEwen
Bill, That last line did the trick.  I was using the quotemeta function, but found that it was inserting a '/' character before/after the variable. Thanks again for the help! Have a great weekend. Regards, Chris McEwen Sr. Configuration Management Analyst Alcatel Canada Inc. Office: 416.748.442

RE: Metacharacters

2005-08-26 Thread Andy_Bach
if ($LogLinePrefix =~ /[][^$_*?.|(){}\\]*/) { $LoglinePrefix =~ s/([][^$_*?.|(){}\\]*)/\\{$1}/g; } Just a point - no need to do this twice. Either: $LoglinePrefix =~ s/([][^$_*?.|(){}\\]*)/\\{$1}/g; or, if you want to do something else if it matches: if ($LogLinePrefix =~

RE: Metacharacters

2005-08-26 Thread Chad I. Uretsky
Title: Message Check the docs on perl regexp.  Most metacharacters do not need to be escaped with the backslash when they are used in a character class (they don't act as metacharacters when between []).  The caret (^) will negate the character class if it is the first thing following the op

RE: Metacharacters

2005-08-26 Thread Chad I. Uretsky
Title: Message I just noticed, after I sent my first e-mail, not only did you fail to provide parentheses to setup your pattern memory, you are actually putting in a preceding '\' instead of '/' in your substitution.   The substitution string (if you're really just trying to prepend '/') sho

Re: Metacharacters

2005-08-26 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > > Morning, > > I am working on some code which will check for a line starting with any > Perl Metacharacters, and precede it with a '/'. > Here is what i have thus far: > > if ($LogLinePrefix =~ > /[\^\$\+\*\?\.\|\(\)\{\}\\\[\]]/) >

RE: Metacharacters

2005-08-26 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 26 August 2005 13:53 To: ActivePerl@listserv.ActiveState.com Subject: Metacharacters Morning, I am working on some code which will chec

RE: Metacharacters

2005-08-26 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 26 August 2005 13:26 To: activeperl@listserv.ActiveState.com; [EMAIL PROTECTED]; perl-unix-users@listserv.ActiveState.com Subject: Metacharacters Morni

Re: Metacharacters

2005-08-26 Thread Gisle Aas
[EMAIL PROTECTED] writes: > Unfortunately, this isn't working. Can anyone make a suggestion? Use the built in quotemeta() function. --Gisle ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com

Re: regexp

2005-08-26 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > I agree with Bill. It looks to me like the expression is containing what > you would like to point out as bad. > > remember when you do a-z you're going from ascii value for A to ascii > value for z > the short \w is [A-Za-z0-9] and gets all "word characters" Plus un

Metacharacters

2005-08-26 Thread Chris . McEwen
Morning, I am working on some code which will check for a line starting with any Perl Metacharacters, and precede it with a '/'. Here is what i have thus far:                         if ($LogLinePrefix =~ /[\^\$\+\*\?\.\|\(\)\{\}\\\[\]]/)                                 {                        

Re: regexp

2005-08-26 Thread JPerlmutter
I agree with Bill. It looks to me like the expression is containing what you would like to point out as bad. remember when you do a-z you're going from ascii value for A to ascii value for z the short \w is [A-Za-z0-9] and gets all "word characters" i found that orielly explains the regexp ins

Metacharacters

2005-08-26 Thread Chris . McEwen
Morning, I am working on some code which will check for a line starting with any Perl Metacharacters, and precede it with a '/'. Here is what i have thus far:                         if ($LogLinePrefix =~ /[\^\$\+\*\?\.\|\(\)\{\}\\\[\]]/)                                 {                        

setting the registry

2005-08-26 Thread JPerlmutter
Brian- At the point I had sent that I had only found three and had been playing with manipulating them for a while since they failed to set it initially with one exception that failed to keep the correct type. this one based on one of the four (the only one i had somehow missed or not tried)

RE: Flushing all open file descriptors...

2005-08-26 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arijit Das Sent: 25 August 2005 19:25 To: activeperl@listserv.ActiveState.com; perl-unix-users@listserv.ActiveState.com Subject: Flushing all open file descriptors... Is there a

RE: Setting Registry Values with Win32::TieRegistry is failing

2005-08-26 Thread Brian Raven
[EMAIL PROTECTED] wrote: > using the following code to try to set values is failing. the > commented out set line works, but changes the type. all > variations i I have tried of the uncommented line have failed. > > ###code through next like > this

Re: Regex question

2005-08-26 Thread $Bill Luebkert
Sandeep Deshpande wrote: > Dear All, > I am trying to pass list of acceptable characters in a string and then warn > user about un-acceptable characters in the said string. My sample script > goes as follows > CASE 1:- > > my $filebuf = "ABCD123

Re: Flushing all open file descriptors...

2005-08-26 Thread $Bill Luebkert
Arijit Das wrote: > For me to use this, I will have to explicitly > specify/SELECT all the file handles and then execute > $| =1; which is something i don't want...cos my pgm is > huge and finding out open file handles from each > corner of it is cumbersome... That's the way life goes sometimes.

Regex question

2005-08-26 Thread Sandeep Deshpande
Dear All, I am trying to pass list of acceptable characters in a string and then warn user about un-acceptable characters in the said string. My sample script goes as follows CASE 1:- my $filebuf = "ABCD123{}\[\]`"; if ($filebuf =~ s/([^A-z\d])/$