Re: TableContentParser output question

2006-11-17 Thread Rob Dixon
Dennis Bourn wrote: Im trying to hack together a perl script to screen scrape some data from a table on a webpage and enter that data into a MySQL database. This would be my first attempt using perl and HTML::TableContentParser. The following script was created using bits and pieces ive found o

Re: Controlling email built with MIME::Lite?

2006-11-17 Thread Mumia W.
On 11/17/2006 09:07 AM, Zembower, Kevin wrote: I'm trying to send an HTML (boss' demand) using MIME::Lite. The program I'm using is pasted in below my signature. When I comment out all the '$msg->attach' lines, the body of the email message appears as HTML in my Outlook email reader. As soon as I

Re: removing single quotation marks from a string ?

2006-11-17 Thread John W. Krahn
Mumia W. wrote: > > This works: > > use Mysql; > use strict; > use warnings; > > my $regex = '^(\d+)-(\w+)-(\d+) (\d+):(\d+):(\d+).*?client' > . '\s(\d+)(.\d+)(.\d+)(.\d+)#(\d+): view external: (.*)$'; You need to escape the . character to match a literal period. You should probably also use t

TableContentParser output question

2006-11-17 Thread Dennis Bourn
Im trying to hack together a perl script to screen scrape some data from a table on a webpage and enter that data into a MySQL database. This would be my first attempt using perl and HTML::TableContentParser. The following script was created using bits and pieces ive found on various perl examp

Re: How to detect a file creation

2006-11-17 Thread Jay Savage
On 11/17/06, Mário Gamito <[EMAIL PROTECTED]> wrote: Hi, I need to write a script that detects when a file is created in a certain directory and then e-mail it. I thought about fam. Problem is the machine is a AIX and it doens't have fam. I think in PERL is possible to do the trick. I don't k

Re: Perl - Joining of Binary values

2006-11-17 Thread Rob Dixon
Dr.Ruud wrote: Rob Dixon schreef: use strict; use warnings; my @hex = ("31","59", "4C","15","53","DD","54","31"); my $hex = join '', @hex; # (1) my $binary = unpack 'b*', pack 'H*', $hex; # (2) my @fields = $binary =~ /.{1,7}/g; $_ = reverse foreach @fields; print "$_\n" foreach @fields;

Maypole-friendly ISPs?

2006-11-17 Thread Jay Savage
Taking advantage of that "if it's Perl-related..." clause in the FAQ...I'm cross-posting to the maypole list, as well, but things look preety dead over there. Does anyone have experience with web hosts that provide support Maypole? I just found out that, for reasons of institutional policy, my de

RE: Controlling email built with MIME::Lite?

2006-11-17 Thread Zembower, Kevin
Dave, you're the best. For some reason, MIME::Lite behaves differently if the data is in a Data or Path class. For archive reference, I've pasted in my final working program at the end of this note. Especially useful was your suggestion regarding the tag contents. I found that I didn't need th

Re: removing single quotation marks from a string ?

2006-11-17 Thread Mumia W.
On 11/17/2006 01:22 AM, Gregory Machin wrote: Hi Hi Gregory Machin. You top-posted. Please don't do that. I corrected the top-posing and made it a bottom-post. I'm still not getting the result i require please could someone have a quick look and see what i'm missing ... the following code

Re: How to detect a file creation

2006-11-17 Thread Tom Phoenix
On 11/17/06, Mário Gamito <[EMAIL PROTECTED]> wrote: I need to write a script that detects when a file is created in a certain directory and then e-mail it. Sending a file by e-mail is the easy part. You'll need to work on "when a file is created". For example, if I were to run some big, slow

RE: Controlling email built with MIME::Lite?

2006-11-17 Thread Zembower, Kevin
Dave, thanks for your suggestion. I've tried this, but without success. I think I've almost duplicated the example given in the docs, with the script pasted in at the end of this message, but I get the same result, with both parts of the message attached. The only difference might be the use of 'Da

RE: Question on an error I keep receiving...

2006-11-17 Thread Brian Volk
> -Original Message- > From: Phil Strack [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 14, 2006 5:06 PM > To: beginners@perl.org > Subject: Question on an error I keep receiving... > > Hi > I'm very new to Perl and teaching myself...Running ActiveState port on > Windows Server 2003

Controlling email built with MIME::Lite?

2006-11-17 Thread Zembower, Kevin
I'm trying to send an HTML (boss' demand) using MIME::Lite. The program I'm using is pasted in below my signature. When I comment out all the '$msg->attach' lines, the body of the email message appears as HTML in my Outlook email reader. As soon as I uncomment just one of the '$msg->attach' lines,

Re: Perl - Joining of Binary values

2006-11-17 Thread Dr.Ruud
Rob Dixon schreef: > use strict; > use warnings; > > my @hex = ("31","59", "4C","15","53","DD","54","31"); > my $hex = join '', @hex; # (1) > my $binary = unpack 'b*', pack 'H*', $hex; # (2) > > my @fields = $binary =~ /.{1,7}/g; > $_ = reverse foreach @fields; > > print "$_\n" foreach @fields;

How to detect a file creation

2006-11-17 Thread Mário Gamito
Hi, I need to write a script that detects when a file is created in a certain directory and then e-mail it. I thought about fam. Problem is the machine is a AIX and it doens't have fam. I think in PERL is possible to do the trick. I don't know in advance the name of the files that are created.

Re: Perl - Joining of Binary values

2006-11-17 Thread Rob Dixon
Dharshana Eswaran wrote: On 11/17/06, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: The input is "31","59", "4C","15","53","DD","54","31" The above input is represented as shown below: 00110001 01011001 01001100 00010101 01010011 11011101 01010100 00110001 The correction in the desired outpu

Re: Perl - Joining of Binary values

2006-11-17 Thread Dr.Ruud
"Dr.Ruud" schreef: Some explanation of the tight code follows. > my $data = join "\n", map {sprintf "%08b", $_} > map hex, =~ /[[:xdigit:]]+/g ; Let's start at the end: @r1 = =~ /[[:xdigit:]]+/g ; That creates a list of the sequences of hexadecimal digit character