[25064] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7314 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 26 18:10:39 2004

Date: Tue, 26 Oct 2004 15:10:12 -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           Tue, 26 Oct 2004     Volume: 10 Number: 7314

Today's topics:
    Re: MAIL recommendation <lwt0301@bellsouth.net>
    Re: MAIL recommendation <nospam@nospam.com>
    Re: MAIL recommendation <phaylon@dunkelheit.at>
    Re: open-perl-ide qustion <nospam@nospam.com>
    Re: open-perl-ide qustion <uguttman@athenahealth.com>
    Re: open-perl-ide qustion $_@_.%_
    Re: open-perl-ide qustion <spamtrap@dot-app.org>
    Re: open-perl-ide qustion <nospam@nospam.com>
    Re: open-perl-ide qustion <tadmc@augustmail.com>
        regex to extract color guide from html <cmail@cherryplankton.com>
        regex trick needed <patrick.drouin@umontreal.ca>
    Re: regex trick needed <perl@my-header.org>
    Re: regex trick needed <mritty@gmail.com>
    Re: regex trick needed <noreply@gunnar.cc>
    Re: regex trick needed <patrick.drouin@umontreal.ca>
    Re: regex trick needed <noreply@gunnar.cc>
        Verify a url form a perl script (joe)
    Re: Verify a url form a perl script <mritty@gmail.com>
    Re: Verify a url form a perl script <tadmc@augustmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 26 Oct 2004 15:42:30 -0400
From: Laura <lwt0301@bellsouth.net>
Subject: Re: MAIL recommendation
Message-Id: <10ntabba50lcj73@news.supernews.com>

daniel kaplan wrote:

>> As regards the original question in this thread, and the related FAQ
>> entries, I did post an answer to the OP (even if he seems to have been
>> too buzy to acknowledge it...). I mentioned Mail::Sender and MIME::Lite.
> 
> my apologies gunnar,
> 
> i do make the attempt to thanks answers, and i only show these two from
> you
> where you are answering charlton (not that i have opened his).  but i show
> no answer here from you regarding Mail::Sender and MIME::Lite
> 
> ahhh wait, there it is, it is a reply to the ORIGINAL....but it got pushed
> to the bottom due to the length of this thread's tangent...


Try Mail::Mailer.




------------------------------

Date: Tue, 26 Oct 2004 17:22:18 -0400
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: MAIL recommendation
Message-Id: <1098825774.90133@nntp.acecape.com>

thanks

> Try Mail::Mailer.




------------------------------

Date: Wed, 27 Oct 2004 00:02:28 +0200
From: "Robert Sedlacek" <phaylon@dunkelheit.at>
Subject: Re: MAIL recommendation
Message-Id: <opsghzieye2n465k@localhost>

Am Tue, 26 Oct 2004 08:11:36 -0500 schrieb Ron Parker  
<ron.parker@povray.org>:

> My apologies for my imprecision: I meant for him to unsubscribe, since
> to killfile everyone here who doesn't agree with him would have roughly
> the same effect.

Oh sorry, english is not my native language and I'm long out of training,
so I'm sure it's mostly my fault.

Damn coffee, everytime not enough.

g,
Robert

-- 
http://www.dunkelheit.at/


------------------------------

Date: Tue, 26 Oct 2004 14:07:07 -0400
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: open-perl-ide qustion
Message-Id: <1098814259.327605@nntp.acecape.com>

> why don't you read the ENTIRE FAQ already. i recommend that all the
> time. but i am sure you won't do it as it is smart advice and you don't
> like that. you can ignore me as well if you wish. i read your posts for
> the amusement value

i have started uri, but surely you, the expert,  can see that one sitting
won't cover the whole thing, nor will one reading make it all sink in.
unless of course you are some genius with photgraphic memory, my hat's off
to you....

although aactually, if you were a genius you would have understood when i
said:
" i will make sure i scour the FAQ and PERLDOC first"  that what i meant
was, ....before asking any question here, i will make sure i specifically go
through the FAQ and use perldoc with as many words as possible...

i read your posts just to see how stubborn, unforgiving, and anti-social
people can be...you must make friends very easily...but at least you've
shown me one thing, it's not just me...

TA




------------------------------

Date: Tue, 26 Oct 2004 15:00:03 -0400
From: Uri Guttman <uguttman@athenahealth.com>
Subject: Re: open-perl-ide qustion
Message-Id: <m3wtxdz4ng.fsf@linux.local>

>>>>> "dk" == daniel kaplan <nospam@nospam.com> writes:

  dk> i have started uri, but surely you, the expert, can see that one
  dk> sitting won't cover the whole thing, nor will one reading make it
  dk> all sink in.  unless of course you are some genius with
  dk> photgraphic memory, my hat's off to you....

but have you read it all at least once already? have you learned how to
search it for questions? have you learned how to use perldoc? these are
critical tools. no one is expected to know all the FAQ or perldocs. you
ARE expected to know how to search them. you act like you can't pickup
the basics of doc usage. nor have you read the group guidelines yet it
seems.

you alienate all the regulars and then bitch about it. you make personal
insults to those who comment on just your behavior here. see a pattern?

  dk> although aactually, if you were a genius you would have understood
  dk> when i said: " i will make sure i scour the FAQ and PERLDOC first"
  dk> that what i meant was, ....before asking any question here, i will
  dk> make sure i specifically go through the FAQ and use perldoc with
  dk> as many words as possible...

but you have shown a lack of skill in doing that so far. no wonder
people here think you won't do it or SCOUR it poorly.

  dk> i read your posts just to see how stubborn, unforgiving, and
  dk> anti-social people can be...you must make friends very
  dk> easily...but at least you've shown me one thing, it's not just
  dk> me...

you read my posts? wow. how nice of you. i am humbled by that. and i
have plenty of friends and don't need too many more so losing you
doesn't hurt much.

uri



------------------------------

Date: Tue, 26 Oct 2004 19:11:22 GMT
From: $_@_.%_
Subject: Re: open-perl-ide qustion
Message-Id: <ujxfd.3308$t23.2185@trndny03>


[OT?]

Sorry perhaps im jumping into this thread at an unfortunate time.
I've not read a majority of this thread, although I have a quick question.

Does anyone know if Visual Perl from AS can be integrated into
the SharpDevelop IDE (free .NET clone)?




------------------------------

Date: Tue, 26 Oct 2004 15:34:17 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: open-perl-ide qustion
Message-Id: <aLydnf1IK5snO-PcRVn-hg@adelphia.com>

daniel kaplan wrote:

> i have started uri, but surely you, the expert,  can see that one sitting
> won't cover the whole thing, nor will one reading make it all sink in.

I generally encourage folks to at least read all the questions at first. 
That's an easier task, and you can always look up the answers as you 
need them.

The same applies to Perl docs in general, actually. Trying to memorize 
them all would be a Herculean task. But it *is* a pretty good idea to 
familiarize yourself with "perldoc perl", so you'll know what docs are 
available.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


------------------------------

Date: Tue, 26 Oct 2004 15:54:33 -0400
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: open-perl-ide qustion
Message-Id: <1098820507.466453@nntp.acecape.com>

> but have you read it all at least once already? have you learned how to
skimmed, not trhough

> you alienate all the regulars and then bitch about it. you make personal
> insults to those who comment on just your behavior here. see a pattern?
i give as i egt back

> but you have shown a lack of skill in doing that so far. no wonder
> people here think you won't do it or SCOUR it poorly.
there's an insult

> you read my posts? wow. how nice of you. i am humbled by that. and i
> have plenty of friends and don't need too many more so losing you
> doesn't hurt much.
never lost me, never ahd me...but your social skills truly amaze me.....

case in point:

i say i will make sure i go through them before i post a question again....
and you snap at me anyway




------------------------------

Date: Tue, 26 Oct 2004 16:18:47 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: open-perl-ide qustion
Message-Id: <slrncntfpn.o7t.tadmc@magna.augustmail.com>

Uri Guttman <uri@stemsystems.com> wrote:
>>>>>> "BS" == Bill Segraves <segraves_f13@mindspring.com> writes:
> 
>  >> vi?  is this another one i can try?
> 
>  BS> cat
> 
> that is a dog of an editor!


and it doesn't use a mouse!


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 26 Oct 2004 17:53:27 -0400
From: cp <cmail@cherryplankton.com>
Subject: regex to extract color guide from html
Message-Id: <10nti0uq7ik3h6e@news.supernews.com>

I copied a webpage that had a color guide that I liked.  I wanted to extract
the color names and codes and make a list of name alternating with code,
which, of course, could be made into a hash or saved in a file or whatever. 
Below is some random clippings from the html so you can see what I am
working with.  Below that is the foreach loop that goes through and looks
for the color name and color code.  The html file is already loaded into
@data.  I thought that it worked fine until I realized that some colors
were missed.  I then observed that the first color to be picked up on a
line was picked up but the remaining colors on the same line were skipped. 
I thought that adding the g modifier at the end of the regex would fix it
but it produced the same exact output.  Any suggestions would be greatly
appreciated.


 class=s><br>&nbsp;<td>mediumseagreen (<a href="colorsvg.html">SVG</a>)
#3CB371<td bgcolor="#3CB371" class=s><td>gray24 #3D3D3D<td
bgcolor="#3D3D3D" class=s>^M
<tr align=right><td>cobalt #3D59AB<td bgcolor="#3D59AB"
class=s><br>&nbsp;<td>cobaltgreen #3D9140<td bgcolor="#3D9140"
class=s><td>gray25 #404040<td bgcolor="#404040" class=s>^M

<tr align=right><td>dodgerblue4 #104E8B<td bgcolor="#104E8B"
class=s><br>&nbsp;<td>ultramarine #120A8F<td bgcolor="#120A8F"
class=s><td>gray7 #121212<td bgcolor="#121212" class=s>^M


foreach(@data)
{
        next if not /td\>(\S+\s?\S*)\s*(\#[[:xdigit:]]+)\<td/g;
        my $s1 = "$1\n";
        my $s2 = "$2\n";
        push @output,($s1,$s2);
}



-- 
www.cherryplankton.com


------------------------------

Date: Tue, 26 Oct 2004 18:52:57 GMT
From: Patrick Drouin <patrick.drouin@umontreal.ca>
Subject: regex trick needed
Message-Id: <d2xfd.111835$0f.40144@charlie.risq.qc.ca>

Hello guys,

I've browsed the web, looked at the camel book and asked around but I 
haven't been able to solve what seems to be a simple problem. I want to 
load regex on the fly from an external file, that's not a big thing.

The  problem I am running into is that these regex used patterns I have 
described somewhere else in my program and stored into scalars. Here's 
the thing :

Defined in my program (to simplify regex writing by the users):
$nom = '[^\/]+\/(?:Proper|Common)_Noun\/[^ ]+';
$adj =  '[^\/]+\/Adjective\/[^ ]+';
 ....

I now have these rules outside:
\s$nom
\s$nom (?:$adj)+

I use them this way :
if(@matches = $line =~ /$regex/g) {save_list(@matches);print "Yup!\n";}
else {print "Nope!\n";}

I'm not getting any "Yup!" back.... It seems that the internal $nom 
scalar is not expanded to its definition in the pattern. Is there anyway 
to force Perl to do this in a regex?

I've tried defining the first rule as this in the external file and it 
works just fine :

\s[^\/]+\/(?:Proper|Common)_Noun\/[^ ]+

Any help will be appreciated.

Patrick


------------------------------

Date: Tue, 26 Oct 2004 22:04:50 +0200
From: Matija Papec <perl@my-header.org>
Subject: Re: regex trick needed
Message-Id: <r4btn0h7ik566jmt5p261p2hl1f0aj100q@4ax.com>

X-Ftn-To: Patrick Drouin 

Patrick Drouin <patrick.drouin@umontreal.ca> wrote:
>Defined in my program (to simplify regex writing by the users):
>$nom = '[^\/]+\/(?:Proper|Common)_Noun\/[^ ]+';
>$adj =  '[^\/]+\/Adjective\/[^ ]+';
>....
>
>I now have these rules outside:
>\s$nom
>\s$nom (?:$adj)+
>
>I use them this way :
>if(@matches = $line =~ /$regex/g) {save_list(@matches);print "Yup!\n";}
>else {print "Nope!\n";}
>
>I'm not getting any "Yup!" back.... It seems that the internal $nom 

I would first print $line and $regex before your condition.



-- 
Matija


------------------------------

Date: Tue, 26 Oct 2004 19:59:28 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: regex trick needed
Message-Id: <A0yfd.5842$Ae3.4009@trndny02>

"Patrick Drouin" <patrick.drouin@umontreal.ca> wrote in message
news:d2xfd.111835$0f.40144@charlie.risq.qc.ca...

> I've browsed the web, looked at the camel book and asked around but I
> haven't been able to solve what seems to be a simple problem. I want
to
> load regex on the fly from an external file, that's not a big thing.
>
> The  problem I am running into is that these regex used patterns I
have
> described somewhere else in my program and stored into scalars. Here's
> the thing :
>
> Defined in my program (to simplify regex writing by the users):
> $nom = '[^\/]+\/(?:Proper|Common)_Noun\/[^ ]+';
> $adj =  '[^\/]+\/Adjective\/[^ ]+';
> ....
>
> I now have these rules outside:
> \s$nom
> \s$nom (?:$adj)+
>
> I use them this way :
> if(@matches = $line =~ /$regex/g) {save_list(@matches);print
"Yup!\n";}
> else {print "Nope!\n";}
>
> I'm not getting any "Yup!" back.... It seems that the internal $nom
> scalar is not expanded to its definition in the pattern. Is there
anyway
> to force Perl to do this in a regex?

I can't parse most of what you've said (and you didn't provide a
short-but-complete script that demonstrates your problem), but this
sentence is a red-flag.  Have you read the entry titled "How can I
expand variables in text strings?" in the Perl FAQ?

perldoc -q expand

If that doesn't solve your problem, please post a short-but-complete
script that demonstrates your problem.  Perl is usually easier to
understand than English.  (of course, the best explanation is both Perl
and English...)

Paul Lalli




------------------------------

Date: Tue, 26 Oct 2004 22:12:26 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: regex trick needed
Message-Id: <2u7pflF266gqpU1@uni-berlin.de>

Patrick Drouin wrote:
> 
> Defined in my program (to simplify regex writing by the users):
> $nom = '[^\/]+\/(?:Proper|Common)_Noun\/[^ ]+';
> $adj =  '[^\/]+\/Adjective\/[^ ]+';
> ....
> 
> I now have these rules outside:
> \s$nom
> \s$nom (?:$adj)+
> 
> I use them this way :
> if(@matches = $line =~ /$regex/g) {save_list(@matches);print "Yup!\n";}
> else {print "Nope!\n";}
> 
> I'm not getting any "Yup!" back.... It seems that the internal $nom 
> scalar is not expanded to its definition in the pattern. Is there anyway 
> to force Perl to do this in a regex?

Maybe you want to preprocess $regex before using it in the regex.

     perldoc -q "expand variables"

If that doesn't help, please post a short but *complete* program that 
illustrates what you are trying to do.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: Tue, 26 Oct 2004 21:10:57 GMT
From: Patrick Drouin <patrick.drouin@umontreal.ca>
Subject: Re: regex trick needed
Message-Id: <B3zfd.113945$0f.88480@charlie.risq.qc.ca>

Although the description of my problem was not very clear, you guys 
pointed me in the right direction. Here's what I used:

$rule =~ s/\$(\w+)/${$1}/g;

This expans the variable used inside the rule I read from text files.

Thanks,
Patrick


------------------------------

Date: Tue, 26 Oct 2004 23:52:35 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: regex trick needed
Message-Id: <2u7vd4F27hlmmU1@uni-berlin.de>

Patrick Drouin wrote:
> Although the description of my problem was not very clear, you guys 
> pointed me in the right direction. Here's what I used:
> 
> $rule =~ s/\$(\w+)/${$1}/g;
> 
> This expans the variable used inside the rule I read from text files.

If that made it, you are probably not using strict. Bad! :(

A better solution is indicated at the *end* of

     perldoc -q "expand variables"

Why not try that, and start using strictures and warnings, and become a 
better Perl programmer? ;-)

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: 26 Oct 2004 11:20:21 -0700
From: joez3@yahoo.com (joe)
Subject: Verify a url form a perl script
Message-Id: <5619c20c.0410261020.5616aa70@posting.google.com>

I have been asked to write a perl script that will deploy a web page
to one of our servers, I was able to do this. But now I want to be
able to make sure that web page comes up and that we can navagate
around the pages. Is there some built in functions that will let me do
this? Can someone point me in the right direction to get started.
Thanks,
Zim


------------------------------

Date: Tue, 26 Oct 2004 18:27:43 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Verify a url form a perl script
Message-Id: <zGwfd.3170$Xq3.1891@trndny01>

"joe" <joez3@yahoo.com> wrote in message
news:5619c20c.0410261020.5616aa70@posting.google.com...
> I have been asked to write a perl script that will deploy a web page
> to one of our servers, I was able to do this. But now I want to be
> able to make sure that web page comes up and that we can navagate
> around the pages. Is there some built in functions that will let me do
> this? Can someone point me in the right direction to get started.

A pointer in the right direction:  perldoc LWP::Simple

This is the module that lets you write very simple HTTP clients.  Use it
to fetch a supplied URL, and then peruse the returned document (perhaps
with HTML::Parser) to verify that it contains what you think it
contains.

Paul Lalli




------------------------------

Date: Tue, 26 Oct 2004 16:35:13 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Verify a url form a perl script
Message-Id: <slrncntgoh.o7t.tadmc@magna.augustmail.com>

joe <joez3@yahoo.com> wrote:

> I want to be
> able to make sure that web page comes up 


Type its URL into the little box at the top of the browser window...


> and that we can navagate
> around the pages. 


 ... then click on stuff.


-- 
    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 7314
***************************************


home help back first fref pref prev next nref lref last post