[23170] in Perl-Users-Digest
Perl-Users Digest, Issue: 5391 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 19 18:06:08 2003
Date: Tue, 19 Aug 2003 15:05:09 -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, 19 Aug 2003 Volume: 10 Number: 5391
Today's topics:
Re: CGI is not so hard <Juha.Laiho@iki.fi>
Re: executing .exe on NT from remote Unix server <oakbarrett@hotmail.com>
Re: executing .exe on NT from remote Unix server <matthew.garrish@sympatico.ca>
Re: executing .exe on NT from remote Unix server <oakbarrett@hotmail.com>
Re: executing .exe on NT from remote Unix server <matthew.garrish@sympatico.ca>
Re: executing .exe on NT from remote Unix server <chesucat@freeshell.org>
Re: I love Perl <scripts_you_know_the_drill_@hudsonscripting.com>
Re: mod_perl 2 Setup ? <rbaba99@caramail.com>
Re: Order of evaluation of expressions <michael.p.broida@boeing.com>
Perl or PHP for web work ? <none@spammenever.com >
Re: Perl or PHP for web work ? <philrob@HOLYflatnetSHIT.net>
Re: Perl or PHP for web work ? (James)
Re: Perl web developer wanted (London, UK) <dha@panix.com>
Re: PERL, FTP and Browser Upload (John Tkaczewski)
Re: Quick removal of the begging of a file? (Carlton Brown)
Re: Quick removal of the begging of a file? <emschwar@pobox.com>
Re: Quick removal of the begging of a file? <tony_curtis32@yahoo.com>
Regex - assign to new variable and replace in one line? (Brad Walton)
Re: Regex - assign to new variable and replace in one l <noreply@gunnar.cc>
Re: Regex - assign to new variable and replace in one l <mpapec@yahoo.com>
regex conditional question (Jonathan Driller)
Re: regex conditional question <krahnj@acm.org>
Re: regex conditional question (Tad McClellan)
Re: single entry window with input being sent to 2..n x <robsjobs@hotmail.com>
Re: soap, etc <scripts_you_know_the_drill_@hudsonscripting.com>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 19 Aug 2003 19:07:01 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: CGI is not so hard
Message-Id: <bhtsg1$j3r$1@ichaos.ichaos-int>
scripts_you_know_the_drill_@hudsonscripting.com said:
>Thanks Juha for that post and you definitely made some great points
>about the dangers of cuting and pasting code in a production
>environment.
>
>I'm still not 100% with you on CGI.pm. People around here seem very
>loyal to it, but I have read in a lot of different places that it is
>too large and slow, etc.
CGI.pm startup (compilation) time is measurable, that is true. It is
a sizable piece of code.
But then, _if_ you're concerned by the difference CGI.pm startup makes
to your script, you should be considering to move away from the traditional
CGI mode of execution anyway (i.e. to use FastCGI, mod_perl, or some
other means to avoid recompiling your CGI scripts upon each call).
At this point you get the functionality of CGI.pm but avoid the high
start-up cost.
Also, there's a significant difference in start-up time when importing
all CGI.pm methods into your namespace with 'use CGI qw/:all/;' instead
of using the OO-interface with just 'use CGI;'. So, the "qw/:all/"
forces CGI.pm to load and compile all methods it has during your script
startup, whether or not you use them in your script. The latter will
compile what is needed more or less at the time it is needed.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
------------------------------
Date: Tue, 19 Aug 2003 11:10:54 -0700
From: "Oak Barrett" <oakbarrett@hotmail.com>
Subject: Re: executing .exe on NT from remote Unix server
Message-Id: <3f426e65$1@usenet01.boi.hp.com>
i have been looking at
libwww-perl-5.65 > HTTP::Request
do you guys think this is the best way to go?
thanks
oak
"Oak Barrett" <oakbarrett@hotmail.com> wrote in message
news:e29c93e4.0308190942.62659822@posting.google.com...
> hi all..
>
> i have searched this group and cpan to no avail.
>
> is there a module or a way for me to login to a remote windows server
> from a perl script on a unix box, and execute a .exe on the windows
> box?
>
> thanks for any help
------------------------------
Date: Tue, 19 Aug 2003 13:59:50 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: executing .exe on NT from remote Unix server
Message-Id: <GAt0b.3603$HB4.467899@news20.bellglobal.com>
"Oak Barrett" <oakbarrett@hotmail.com> wrote in message
news:e29c93e4.0308190942.62659822@posting.google.com...
> hi all..
>
> i have searched this group and cpan to no avail.
>
> is there a module or a way for me to login to a remote windows server
> from a perl script on a unix box, and execute a .exe on the windows
> box?
>
Net::Telnet seems like the most obvious choice, unless you're leaving out
some important details...
Matt
------------------------------
Date: Tue, 19 Aug 2003 12:05:48 -0700
From: "Oak Barrett" <oakbarrett@hotmail.com>
Subject: Re: executing .exe on NT from remote Unix server
Message-Id: <3f427b43$1@usenet01.boi.hp.com>
matt, thanks for the reply...
i currenlty can not telnet to the windows box, so i would assume i would
neet to install a telnet server on the windows box?
thanks
"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message
news:GAt0b.3603$HB4.467899@news20.bellglobal.com...
>
> "Oak Barrett" <oakbarrett@hotmail.com> wrote in message
> news:e29c93e4.0308190942.62659822@posting.google.com...
> > hi all..
> >
> > i have searched this group and cpan to no avail.
> >
> > is there a module or a way for me to login to a remote windows server
> > from a perl script on a unix box, and execute a .exe on the windows
> > box?
> >
>
> Net::Telnet seems like the most obvious choice, unless you're leaving out
> some important details...
>
> Matt
>
>
------------------------------
Date: Tue, 19 Aug 2003 16:01:48 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: executing .exe on NT from remote Unix server
Message-Id: <Zmv0b.29$c_.15702@news20.bellglobal.com>
"Oak Barrett" <oakbarrett@hotmail.com> wrote in message
news:3f427b43$1@usenet01.boi.hp.com...
> matt, thanks for the reply...
>
> i currenlty can not telnet to the windows box, so i would assume i would
> neet to install a telnet server on the windows box?
>
That would help... : )
Using Telnet would be the easiest way to accomplish what you want. I believe
most of the NT derivatives come with Telnet support, you just have to
install it and/or turn it on.
I looked at your other post, and the one comment I would make about using
HTTP is that you will be limited by what the IUSR is allowed to perform on
the windows machine. It can be done, but then anyone else with Web access to
can run the program the same way. Telnet at least provides the security of
having to authenticate yourself to the server, and of being able to place
your programs in a directory that isn't Web visible.
Matt
------------------------------
Date: Tue, 19 Aug 2003 16:58:06 -0400
From: Chesucat <chesucat@freeshell.org>
Subject: Re: executing .exe on NT from remote Unix server
Message-Id: <Pine.NEB.4.33.0308191654160.26211-100000@norge.freeshell.org>
On Tue, 19 Aug 2003, Oak Barrett wrote:
> i have been looking at
>
> libwww-perl-5.65 > HTTP::Request
>
> do you guys think this is the best way to go?
>
> thanks
>
> oak
Do not use telnet! Use SSH instead! You could use rsh if you are on a XP
or W2K box, but I am not sure how secure that would be.
cheesy
--
chesucat@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
Deck Us All With Boston Charlie
Deck us all with Boston Charlie,
Walla Walla, Wash., an' Kalamazoo!
Nora's freezin' on the trolley,
Swaller dollar cauliflower, alleygaroo!
Don't we know archaic barrel,
Lullaby Lilla Boy, Louisville Lou.
Trolley Molly don't love Harold,
Boola boola Pensacoola hullabaloo!
-- Walt Kelly
------------------------------
Date: Tue, 19 Aug 2003 17:40:53 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: I love Perl
Message-Id: <lmg5kv0t8qt4d44g0u9t8vio8ldtino9cg@4ax.com>
On Tue, 19 Aug 2003 04:22:54 GMT, "Gerald Newton"
<senior_citizen@alaska.com> wrote:
>My final good bye to this world is I learned Perl. I am 59 and intend to
>learn Perl this winter. I bought a whole bunch of books including the O
>Reilly series. I have studied PL1, Basic, JavaScript, Fortran 4, but Perl
>seems like the ultimate challenge and the ultimate money maker or monkey
>maker! Anyway, I love the idea of a Swiss army chainsaw programming
>language, especially after having owned several Swiss army knifes and
>several Leathermans.
>I want to thank you guys, especially Larry Wall, for making it all
>possible.
>
hey man...I love perl, too. You should also get into unix and read
some of the early books like "Unix Programming Environment" by
Kernighan and Pike...perl was created out of sed, awk, etc...you
really learn a lot by reading different things.
------------------------------
Date: Tue, 19 Aug 2003 22:36:06 +0200
From: "sam" <rbaba99@caramail.com>
Subject: Re: mod_perl 2 Setup ?
Message-Id: <bhu1id$103l$1@news.cybercity.dk>
> Thanks Sam, I've sent you the httpd.conf etc
Where ?
The email address I use in the news group is fa....
Please send to the news group.
------------------------------
Date: Tue, 19 Aug 2003 19:10:57 GMT
From: "Michael P. Broida" <michael.p.broida@boeing.com>
Subject: Re: Order of evaluation of expressions
Message-Id: <3F427641.DB7094DD@boeing.com>
Tony Curtis wrote:
>
> >> On Mon, 18 Aug 2003 21:48:51 GMT,
> >> "Michael P. Broida" <michael.p.broida@boeing.com> said:
>
> > "Eric J. Roode" wrote:
> >> "Michael P. Broida" <michael.p.broida@boeing.com>
> >> wrote in news:3F412BEA.DC9CA189@boeing.com:
> >>
> >> > Unless I'm missing something in your comment, it
> >> seems the > question boils down to "what precedence do
> >> subroutine/function > calls have?"
> >>
> >> No, not really. Precedence is different than order of
> >> evaluation. In C, for example, precedence is
> >> well-defined, but order of evaluation is famously
> >> undefined.
>
> > Ah, I -think- I see what you're saying. Maybe.
> > <grin>
>
> Precedence tells you how to construct the syntax tree for
> e.g.
>
> a + b * c
>
> +
> a * a + (b * c)
> b c
>
> as opposed to
>
> *
> + c (a + b) * c
> a b
>
> Order of evaluation OTOH tells you in e.g. from the 2nd
> interpretation:
>
> a + b
>
> whether "a" or "b" will be evaluated first (e.g. "a" may
> contain a side-effect that touches "b") which is partly a
> tree-walking consideration. We still know that (a + b)
> will be evaluated in toto before the multiplication.
>
> (Probably hideously over-simplified, compiler-writers take
> pity on me :-)
No, that's a decent explanation. Thanks.
Mike
------------------------------
Date: Tue, 19 Aug 2003 20:22:49 GMT
From: Bob <none@spammenever.com >
Subject: Perl or PHP for web work ?
Message-Id: <et05kvo6fc2t29i0j4hb6fnu3fgon3ha52@4ax.com>
[Crossposted, looking for experts from both for discussion.
Not an argument, just a discussion :-]
As the title says, I'm looking to assess the advantages and
disadvantages of Perl vs. PHP for web (cgi) programming. I'm
a newbie at Perl, and a true novice at PHP but I have lots of
other programming in languages and scripting (eg. ASP) experience.
I know that Perl has the historical advantage in volume and
resources. However, PHP seems to be a strong "up and comer" and
is widely available on web servers.
I think Perl has far greater capabilities as a programming language.
However, it is also _so_ flexible in it's constructs that it is a
little intimidating for someone new to the language. It seems to allow
so many interesting variations that it is at time overwhelming.
(Multiple variables to the left of the assignment statement ? Holy
$hit! :-) I know I don't have to use all the variations, but I find
them in other programmers code, so I'll need to know them.
PHP seems to be a lot simpler. That's an advantage when starting out.
But, does PHP run out of power? I don't know enough of it to
tell at this point. So, I'm looking for comments.
Most of what i plan to do is fairly basic web work... dealing with
data in an out of databases, simple business calculations, etc.
Thoughts on which is a better course to pursue ?
Thanks,
Bob
------------------------------
Date: Tue, 19 Aug 2003 15:40:54 -0500
From: Phil Roberts <philrob@HOLYflatnetSHIT.net>
Subject: Re: Perl or PHP for web work ?
Message-Id: <Xns93DCDC9268E0philroberts@216.196.97.132>
With total disregard for any kind of safety measures Bob
<none@spammenever.com > leapt forth and uttered:
This topic is so old its practically fossilised.
> Most of what i plan to do is fairly basic web work... dealing
> with data in an out of databases, simple business calculations,
> etc. Thoughts on which is a better course to pursue ?
>
Use PHP. PHP was designed for the web and Perl, for all its
flexibility and power, was not.
Besides, for your purposes there really isn't anything that Perl
can do that PHP can't do equally as well if not better.
--
There is no signature.....
------------------------------
Date: Tue, 19 Aug 2003 21:19:03 GMT
From: newsgroup@black-panther.freeserve.co.uk (James)
Subject: Re: Perl or PHP for web work ?
Message-Id: <3f429351.53806750@news.freeserve.com>
On Tue, 19 Aug 2003 15:40:54 -0500, Phil Roberts
<philrob@HOLYflatnetSHIT.net> scrawled:
>With total disregard for any kind of safety measures Bob
><none@spammenever.com > leapt forth and uttered:
>
>This topic is so old its practically fossilised.
>
>> Most of what i plan to do is fairly basic web work... dealing
>> with data in an out of databases, simple business calculations,
>> etc. Thoughts on which is a better course to pursue ?
>>
>
>Use PHP. PHP was designed for the web and Perl, for all its
>flexibility and power, was not.
>
>Besides, for your purposes there really isn't anything that Perl
>can do that PHP can't do equally as well if not better.
>
I use both Perl and PHP extensively for work and hobbies, there are
certain things that PHP isn't quite there yet with - e.g. handling
XHTML documents ( none of the standard PHP XML modules can cope
with HTML's character entities ); handling POST requests (except with
the massive overhead of cURL )... It's also an extremely verbose
language in comparison to the beautiful compactness of Perl...
It's horses for courses, I would try and use PHP for mainly web-based
applications - but I still find it easier to use Perl in about 10% of
these cases and in more general data munging.
At work I have to use Perl as we leverage a large Perl API for webpages,
with many quite complex mod_perl handlers - yet another things you
can't do with PHP.
J
------------------------------
Date: Tue, 19 Aug 2003 18:36:52 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: Perl web developer wanted (London, UK)
Message-Id: <slrnbk4ri4.l6d.dha@panix2.panix.com>
In article <3f41ee7e$0$12646$afc38c87@news.easynet.co.uk>, Branwell
Moffat wrote:
> We are e-business solutions provider based in South West London, UK and are
> looking for a Perl web developer to start within the next 4 weeks.
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
http://jobs.perl.org may be of more use to you
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
A feature is often a bug with seniority. - Chip Salzenberg
------------------------------
Date: 19 Aug 2003 11:56:25 -0700
From: john@unlimited-tech.net (John Tkaczewski)
Subject: Re: PERL, FTP and Browser Upload
Message-Id: <f738db06.0308191056.3b1194b1@posting.google.com>
Take a look at UnlimitedFTP
http://www.unlimitedftp.ca/uftp/index.jsp
It's an FTP client that runs in a Java applet and can be embedded into
any web page on your web site.
John
"Gregory Toomey" <NOSPAM@bigpond.com> wrote in message news:<bh42sm$u5ch6$1@ID-202028.news.uni-berlin.de>...
> "prsjm3qf" <steve@caralan.co.uk> wrote in message
> news:3F34A9F9.419CAD8B@caralan.co.uk...
> > Hello out there,
> > I'm a bit of a Perl newbie and have dropped for
> > the job of writing a file upload system.
> > I've tried various HTTP solutions with form ACTION=POST but have found
> > it unreliable for large files because of server timeout errors and
> > anyway, it's a protocol not really designed for the job.
> > I'm now thinking that the grown up way to do it has got to be with FTP.
>
> As an aside, www.geocities.com has an excellent upload facility for users
> uploading files to their web sites. I think itsjust browser based. Have a
> look at how they do it.
>
> gtoomey
------------------------------
Date: 19 Aug 2003 14:26:20 -0700
From: carltonbrown@hotmail.com (Carlton Brown)
Subject: Re: Quick removal of the begging of a file?
Message-Id: <aa611a32.0308191326.10e2fa52@posting.google.com>
Benjamin Goldberg <ben.goldberg@hotpop.com> wrote in message news:<3F419148.81D4E7FF@hotpop.com>...
[snip]
> open( FH, "<+", $filename ) or die horribly;
Slightly OT question... what's with this "die horribly" usage?
I've seen it a couple of times and even tried it, but it didn't seem
to do anything more spectacular than the obvious result of printing
the string "horribly."
------------------------------
Date: Tue, 19 Aug 2003 15:30:37 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Quick removal of the begging of a file?
Message-Id: <etok799pc76.fsf@wormtongue.emschwar>
carltonbrown@hotmail.com (Carlton Brown) writes:
> Benjamin Goldberg <ben.goldberg@hotpop.com> wrote in message news:<3F419148.81D4E7FF@hotpop.com>...
> [snip]
>> open( FH, "<+", $filename ) or die horribly;
>
> Slightly OT question... what's with this "die horribly" usage?
It's a very odd way to write
die "couldn't open file: $!"
AFAICT. I mean, why throw away useful debugging info, just to be
cute? :)
> I've seen it a couple of times and even tried it, but it didn't seem
> to do anything more spectacular than the obvious result of printing
> the string "horribly."
That's why it's fun to read, not much fun to use.
-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
------------------------------
Date: Tue, 19 Aug 2003 16:33:10 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Quick removal of the begging of a file?
Message-Id: <87smnxcoyx.fsf@limey.hpcc.uh.edu>
>> On Tue, 19 Aug 2003 15:30:37 -0600,
>> Eric Schwartz <emschwar@pobox.com> said:
> carltonbrown@hotmail.com (Carlton Brown) writes:
>> Benjamin Goldberg <ben.goldberg@hotpop.com> wrote in
>> message news:<3F419148.81D4E7FF@hotpop.com>... [snip]
>> open( FH, "<+", $filename ) or die horribly;
>>
>> Slightly OT question... what's with this "die horribly"
>> usage?
> It's a very odd way to write
> die "couldn't open file: $!"
> AFAICT. I mean, why throw away useful debugging info,
> just to be cute? :)
I think it's meant to be "insert suitable diagnostic
and/or handling code here".
"die horribly" has a certain je ne sais quoi about it.
------------------------------
Date: 19 Aug 2003 13:09:30 -0700
From: jw1454@sbc.com (Brad Walton)
Subject: Regex - assign to new variable and replace in one line?
Message-Id: <35c9b416.0308191209.320a5c6e@posting.google.com>
This is probably simple for the experienced Perl programmer, but as I
am learning, and hours of searching has led to nothing, this one has
tied me up long enough... So I could use a little assistance.
I am trying to consolidate the following 2 lines, into 1 line.
$missionname = $check[1];
$missionname =~ s/.mis//;
I am trying to find a way to assign $missionname the same value as
$check[1], and remove '.mis' from the variable, in one expression.
This is really an efficiency issue, and also a learning experience for
me.
Thanks for any help,
Brad
------------------------------
Date: Tue, 19 Aug 2003 22:23:51 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Regex - assign to new variable and replace in one line?
Message-Id: <bhu13f$33rfv$1@ID-184292.news.uni-berlin.de>
Brad Walton wrote:
> This is probably simple for the experienced Perl programmer, but as
> I am learning, and hours of searching has led to nothing, this one
> has tied me up long enough... So I could use a little assistance.
>
> I am trying to consolidate the following 2 lines, into 1 line.
>
> $missionname = $check[1];
> $missionname =~ s/.mis//;
>
> I am trying to find a way to assign $missionname the same value as
> $check[1], and remove '.mis' from the variable, in one expression.
($missionname = $check[1]) =~ s/\.mis//;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Tue, 19 Aug 2003 22:39:33 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: Regex - assign to new variable and replace in one line?
Message-Id: <e825kv0gcu6tmfebvqv803g0ruu407inoo@4ax.com>
X-Ftn-To: Brad Walton
jw1454@sbc.com (Brad Walton) wrote:
>This is probably simple for the experienced Perl programmer, but as I
>am learning, and hours of searching has led to nothing, this one has
>tied me up long enough... So I could use a little assistance.
>
>I am trying to consolidate the following 2 lines, into 1 line.
>
>$missionname = $check[1];
>$missionname =~ s/.mis//;
s/.mis// for $missionname = $check[1];
this one is most common and recommended:
($missionname = $check[1]) =~ s/.mis//;
--
Matija
------------------------------
Date: 19 Aug 2003 11:09:04 -0700
From: jdriller@orchid.org (Jonathan Driller)
Subject: regex conditional question
Message-Id: <a8cff9fb.0308191009.e380de8@posting.google.com>
Hi,
I am re-writing a PERL script to include form validation. I want to
check if a field has no vowels and only no or 1 letter.
If I check for /[^a|e|i|o|u]/i then "ff" matches (any non-vowel)....
Also, /\w{1}/i matches "fr" - but I want to match only if there is
ONLY one of any letter (any 2+ letter word)...
Also, is there an 'and' like there is an 'or' (eg. '|').
Any help appreciated...
JD
------------------------------
Date: Tue, 19 Aug 2003 20:48:22 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: regex conditional question
Message-Id: <3F428CFB.76914FBA@acm.org>
Jonathan Driller wrote:
>
> I am re-writing a PERL script to include form validation. I want to
> check if a field has no vowels and only no or 1 letter.
if ( $field =~ /^[^[:^alpha:]aeiou]?$/i ) {
John
--
use Perl;
program
fulfillment
------------------------------
Date: Tue, 19 Aug 2003 16:17:24 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: regex conditional question
Message-Id: <slrnbk54v4.548.tadmc@magna.augustmail.com>
Jonathan Driller <jdriller@orchid.org> wrote:
> I am re-writing a PERL script to include form validation. I want to
> check if a field has no vowels and only no or 1 letter.
print "$_ is invalid\n" if /[aeiou]/i or tr/a-zA-Z/ > 1;
> If I check for /[^a|e|i|o|u]/i then "ff" matches (any non-vowel)....
That does not do what you think it does.
You should read up on what a character class does.
It is exactly equivalent to /[^uoa|ie]/i for instance...
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 19 Aug 2003 14:14:39 -0600
From: "Rob Petty" <robsjobs@hotmail.com>
Subject: Re: single entry window with input being sent to 2..n xterms simultaneously
Message-Id: <Ryv0b.415$br1.33819@news.uswest.net>
"Jonathan Stowe" <gellyfish@gellyfish.com> wrote in message news:fEU%a.12$Yx6.2912@news.dircon.co.uk...
> Rob Petty <robsjobs@hotmail.com> wrote:
> > I am using a Linux box as a fill-in for a Sun Cluster "cluster console" machine. The only thing I am missing is the ability
to
> > open three windows:
> > 1 is a small window like a Perl/Tk with a simple text input box.
> > 2 are normal xterm windows
> >
> > Each xterm window can have direct text input individually, but the
> > kicker is that typing in the smaller window with just the text box
> > sends the text to both xterm windows at the same time. (One entry
> > for configuration info and any other valid CLI command, two outputs)
> >
>
> At a guess (and I really can't be arsed to experiment right now ) you might
> be able to use X11::Protocol to send the appropriate X events to the xterm
> windows however you may need information about those windows that might not
> be available easily to the Perl program. I'd start by looking in the X
> documentation.
>
Thanks for the reply. I'll start looking into it.
------------------------------
Date: Tue, 19 Aug 2003 17:36:40 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: soap, etc
Message-Id: <gbg5kv4doaft56v76qlaon1k4bo2vkqrbh@4ax.com>
>Well because someone has already written a perfectly good working module
>that works fine for most possible cases. You are right it is relatively
>easy to create code to deal with a specific SOAP transaction given
>examples of the envelopes involved, however after you have had to make
>variant versions of this code to deal with each service you might want to
>deal with you are going to find yourself wanting to abstract this code
>into some generalized reusable package (i.e. a module) unless, of course,
>you have more time than sense, and at that point you might as well be using
>an existing piece of reusable code.
>
>I would suggest that you refer to the documentation at:
>
> http://www.w3.org/2000/xp/Group/
>
>and then maybe come back with some 'simple' code that might handle that.
Thanks for the reply, Jonathan...I guess maybe with SOAP and CGI, I'm
just writing to learn the stuff or do small projects for other
webmasters. So, for me, what I do works fine and actually amuses me no
end.
I think there is a difference between parsing an XML or SOAP reply and
writing a full blown general handler. So it is apples and oranges in
my mind between something single purpose and abstracting this. Also,
remember a single purpose piece of code is less prone to error since
it is much more simple.
Others have made me well aware over the past day, though, of the
dangers of cutting and pasting and of growing your code...I have had
this same experience of losing track of what my code is doing. So I
can understand the arguement for abstraction.
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
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.
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 5391
***************************************