[12309] in Perl-Users-Digest
Perl-Users Digest, Issue: 5909 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 7 08:07:28 1999
Date: Mon, 7 Jun 99 05:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 7 Jun 1999 Volume: 8 Number: 5909
Today's topics:
Re: Afraid to ask about Y2K! (Randal L. Schwartz)
Re: Afraid to ask about Y2K! (Lee)
Re: ANNOUNCE: Champaign-Urbana.pm Meeting Tue Jun 8 (Randal L. Schwartz)
Re: Anyone know what is this script line meaning ?? <matt-news@sergeant.org>
Assignment to $0 <wrigley@cre.canon.co.uk>
Associative Array: isKey() function robert.bowen@mubimedia.com
Re: Associative Array: isKey() function <anfi@bigfoot.com>
Re: Associative Array: isKey() function (Bob Trieger)
Re: Associative Array: isKey() function <gellyfish@gellyfish.com>
Re: Bulk E-Mailing <anfi@bigfoot.com>
Re: Bulk E-Mailing <anfi@bigfoot.com>
Re: CGI and SSI in perl <vincent_vanbiervliet@be.ibm.com>
Re: CGI and SSI in perl <james@britlinks.co.uk>
Re: CGI and SSI in perl (Hasanuddin Tamir)
Re: Coloring text in DOS console? smnayeem@my-deja.com
Re: Determining height and with of uploaded Graphic fil <fruffet@kaptech.com>
Re: Determining height and with of uploaded Graphic fil <gellyfish@gellyfish.com>
Re: Executing adduser? <madvin@dds.nl>
Re: Help - Convert ASP syntax to PERL <matt-news@sergeant.org>
Re: Help needed and much appreciated (Hasanuddin Tamir)
Re: Need help to File Upload in perl ! <rangagv@compucomtech.com>
Re: Perl "constructors" (David Cantrell)
PERL and SMTP <pdeeman@ibm.net>
Perl JOB offer <nick@namecity.com>
Perl/RE savvy??? keol@my-deja.com
Re: Regular Expressions <robert.meppelink@ict.nl>
Re: Regular Expressions <vincent_vanbiervliet@be.ibm.com>
Re: Regular Expressions (Hasanuddin Tamir)
Re: Sending LOTS of Messages by Script <anfi@bigfoot.com>
Re: Setting Numlock in a Perl script (Hasanuddin Tamir)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 07 Jun 1999 04:14:33 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <m11zfol0ti.fsf@halfdome.holdit.com>
>>>>> "Jonathan" == Jonathan Stowe <gellyfish@gellyfish.com> writes:
Jonathan> Steve Bean <sbean@iex.net> wrote:
>> But i WILL anyway. I can't believe someof the flameout answers to good
>> questions about Y2K in this section.
>>
Jonathan> I cant believe that we have got to this stage in the game and
Jonathan> people are still asking this question - what precisely is it that
Jonathan> prevents from going to <http://www.deja.com> and searching for 'Y2K'
Jonathan> in this group ? It found 6500 hits just now.
Perhaps for precisely that reason. The counterflames about it from
the newbies arguing their right to not be flamed outnumber the people
trying to provide what precious little light (rather than heat) there
is to the subject.
If we who know don't post "RTF-FAQ", then FAQ isn't seen in Deja.
If we *do* post "RTF-FAQ", then we get flamed by group readers.
We lose either way. <sigh>
Anyway, if you're reading this in Deja... "Y2K IS ANSWERED IN THE FAQ".
There. I said it. :)
Maybe we need a short "hyper-frequently answered questions" posting.
The Smalltalk group has a "most frequently answered questions" that
posts the locations of many Smalltalk info areas. Wait! Tom Phoenix
is already posting a metafaq... maybe we can get him to include just
this one question from the FAQ as a "sample question and answer". :)
Tom? Got your ears on?
print "Just another Perl FAQer,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Mon, 07 Jun 1999 06:46:52 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <B3811B5C96685D438A@204.112.166.88>
In article <m11zfol0ti.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
>If we who know don't post "RTF-FAQ", then FAQ isn't seen in Deja.
>If we *do* post "RTF-FAQ", then we get flamed by group readers.
>
>We lose either way. <sigh>
It's usually only a problem when you forget to include the RT-FAQ part, or
it gets drowned out by creative elaborations on the other bit.
Lee
------------------------------
Date: 07 Jun 1999 04:16:40 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ANNOUNCE: Champaign-Urbana.pm Meeting Tue Jun 8
Message-Id: <m1wvxgjm5j.fsf@halfdome.holdit.com>
>>>>> "Daniel" == Daniel S Lewart <d-lewart@uiuc.edu> writes:
Daniel> Champaign-Urbana Perl Mongers,
Daniel> Our June meeting will be:
Daniel> Tue Jun 8 19:00 CDT
Daniel> Papa Del's
Daniel> 206 E Green St
Daniel> Champaign, IL
Daniel> We will be in the non-smoking area. I will wear my Perl t-shirt.
I can speak with some authority (having attended last month's
meeting) that:
1) papa del's has good food
2) the c-u.pm group are good people
No, can't make this month's meeting. Wrong state. :)
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Mon, 07 Jun 1999 10:38:10 +0100
From: Matt Sergeant <matt-news@sergeant.org>
Subject: Re: Anyone know what is this script line meaning ??
Message-Id: <375B9302.7AA4F57C@sergeant.org>
Eric The Read wrote:
>
> Jonathan Stowe <gellyfish@gellyfish.com> writes:
> > Oh no ! Matt's been posessed by the spirit of Larry R ;-}
>
> That's ridiculous! There wasn't one 'use Benchmark;' in there
> anywhere. :^)
Hey - I wonder if you can get that down to 'use Benchm~1;' on Win32???
;-)
Matt.
------------------------------
Date: Mon, 7 Jun 1999 09:53:42 GMT
From: Ave Wrigley <wrigley@cre.canon.co.uk>
Subject: Assignment to $0
Message-Id: <375B96A6.1F75933A@cre.canon.co.uk>
Does anyone know what the constraints on assignment to $0 are? According
to perlvar:
Assigning to "$0" modifies
the argument area that the ps(1) program sees. This
is more useful as a way of indicating the current
program state than it is for hiding the program
you're running
And the camel book adds: "But it doesn't work on all systems"
I am using solaris 2.6, and it doesn't seem to work for me:
print "Hi, I'm $0\n";
my $orig_name = $0;
$0 = 'foobar';
print "Hi, I'm $0\n";
print STDERR "is $0 running?\n";
print STDERR `/usr/bin/ps -ef | grep $0 | grep -v grep`;
print STDERR "is $orig_name running?\n";
print STDERR `/usr/bin/ps -ef | grep $orig_name | grep -v grep`;
gives:
> perl test.pl
Hi, I'm test.pl
Hi, I'm foobar
is foobar running?
is test.pl running?
wrigley 5293 4743 0 10:52:04 pts/1 0:00 perl test.pl
Is assignment to $0 supposed to work under solaris? What systems will it
work for?
Ave.
--
Ave Wrigley, mailto:wrigley@cre.canon.co.uk
Web Group, http://www.cre.canon.co.uk/
Canon Research Europe, tel: +44-1483-448844
Guildford GU2 5YJ, U.K. fax: +44-1483-448845
------------------------------
Date: Mon, 07 Jun 1999 09:12:45 GMT
From: robert.bowen@mubimedia.com
Subject: Associative Array: isKey() function
Message-Id: <7jg2e7$j4j$1@nnrp1.deja.com>
Does such a function exist, that checks for the existence of a given
key? I thought of doing it myself, seems quite simple. But before I do
anything I would prefer to use a known solution.
I think I tried once doing something like the following:
if ($myarray{$key} ne '') then {do something} #key exists...
But as I remember it, Perl doesn't return an empty string if you try to
reference a non-existent key in an associative array, and it failed.
Neither do I want to go through the entire array with a $keys function
like the following:
foreach $key (keys $myarray) {
if ($key eq 'searchKey') {do something)
}
...as it's too time and resource consuming. So I'm looking for a
function that takes a key and checks to see if it exists (has a value)
in a given array, an isKey() function more or less...
Anybody know of such a thing? Thanks in advance!
syg
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 07 Jun 1999 12:24:39 +0200
From: Andrzej Filip <anfi@bigfoot.com>
Subject: Re: Associative Array: isKey() function
Message-Id: <375B9DE7.F42FFBBF@bigfoot.com>
exist EXPR
This function returns true if the specified ash key exists in
its hash even if the corresponding value is undefined.
e.g.
print "Exist\n" if exists $hash{$key}
robert.bowen@mubimedia.com wrote:
> Does such a function exist, that checks for the existence of a given
> key? I thought of doing it myself, seems quite simple. But before I do
> anything I would prefer to use a known solution.
>
> I think I tried once doing something like the following:
>
> if ($myarray{$key} ne '') then {do something} #key exists...
>
> But as I remember it, Perl doesn't return an empty string if you try to
> reference a non-existent key in an associative array, and it failed.
>
> Neither do I want to go through the entire array with a $keys function
> like the following:
>
> foreach $key (keys $myarray) {
> if ($key eq 'searchKey') {do something)
> }
>
> ...as it's too time and resource consuming. So I'm looking for a
> function that takes a key and checks to see if it exists (has a value)
> in a given array, an isKey() function more or less...
>
> Anybody know of such a thing? Thanks in advance!
> syg
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
--
Andrzej (Andrew) A. Filip
http://www.bigfoot.com/~anfi
E-mail: anfi@bigfoot.com
I NO LONGER USE anfi@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
------------------------------
Date: Mon, 07 Jun 1999 10:51:26 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Associative Array: isKey() function
Message-Id: <7jg6e7$90n$1@birch.prod.itd.earthlink.net>
[ courtesy cc sent by mail if address not munged ]
robert.bowen@mubimedia.com wrote:
>Does such a function exist, that checks for the existence of a given
>key? I thought of doing it myself, seems quite simple. But before I do
>anything I would prefer to use a known solution.
>
>I think I tried once doing something like the following:
>
>if ($myarray{$key} ne '') then {do something} #key exists...
perldoc -f exists
------------------------------
Date: 7 Jun 1999 11:22:41 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Associative Array: isKey() function
Message-Id: <375b9d71@newsread3.dircon.co.uk>
robert.bowen@mubimedia.com wrote:
> Does such a function exist, that checks for the existence of a given
> key? I thought of doing it myself, seems quite simple. But before I do
> anything I would prefer to use a known solution.
>
Yes but its called exists():
perldoc -f exists
/J\
------------------------------
Date: Mon, 07 Jun 1999 12:36:05 +0200
From: Andrzej Filip <anfi@bigfoot.com>
Subject: Re: Bulk E-Mailing
Message-Id: <375BA095.391CEA5B@bigfoot.com>
John Callender wrote:
> Dani Koesterich <mrdank@sprintmail.com> wrote:
> > Hello, if anyone can help me out I would appreciate it.
>
> > I wrote a script to send out my newsletter issues. My
> > subscribers list exceeds 10,000 so it has to be good, and
> > no screw ups. I wrote one, and tried it out with 300
> > people on my list, and it failed after 100 and when I
> > tried with the last 200 it worked. Does anyone have
> > any ideas why it failed?
>
> I don't notice any load-checking code in your script; it appears that
> it opens a pipe to your mailer program for each address, with no
> pausing to let things settle down when the number of mailer processes
> gets too high. Is it possible there's some kind of memory or CPU
> limitation that's kicking in to shut your script down at some point?
> [...]
Try to add some more options to sendmail invocation:
open(MAIL,"|$mailprog -t -oi -odd");
-oi - single dot is not end of message
-odd - deferred delivery mode, put message in queue
do not do any DNS lookups (this time)
The default mode of sendmail delivery is "background"
- accept message, go to background and deliver.
With thousands messages you have very big chance to
reach your process limit.
--
Andrzej (Andrew) A. Filip
http://www.bigfoot.com/~anfi
E-mail: anfi@bigfoot.com
I NO LONGER USE anfi@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
------------------------------
Date: Mon, 07 Jun 1999 12:39:53 +0200
From: Andrzej Filip <anfi@bigfoot.com>
Subject: Re: Bulk E-Mailing
Message-Id: <375BA178.10D4C7E7@bigfoot.com>
I R A Aggie wrote:
> On Sun, 6 Jun 1999 01:13:54 -0400, Dani Koesterich <mrdank@sprintmail.com>, in
> <7jd09p$f5c$1@oak.prod.itd.earthlink.net> wrote:
>
> + I wrote a script to send out my newsletter issues. My
> + subscribers list exceeds 10,000 so it has to be good, and
> + no screw ups.
>
> Then use the right tool, something like majordomo [1] or
> mailman [2].
>
> James
>
> [1] - http://www.greatcircle.com/
> [2] - http://www.list.org/
You may also try bulk_mailer which is designed for
fast delivery of big email list via sendmail
ftp://cs.utk.edu/pub/moore/bulk_mailer/
--
Andrzej (Andrew) A. Filip
http://www.bigfoot.com/~anfi
E-mail: anfi@bigfoot.com
I NO LONGER USE anfi@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
------------------------------
Date: Mon, 7 Jun 1999 12:40:45 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: CGI and SSI in perl
Message-Id: <375b92df@news.uk.ibm.net>
Your server probably only looks for SSi for shtml files. This is for a
faster response time, if every file (html, cgi, pl) would have to be parsed
to look for SSI, this could slow down the server.
So the only solution I see is to use Perl variables instead of SSI commands.
Vincent
Sharma Madiraju <sharma@tsd.neca.nec.com.au> wrote in message
news:375B7517.BAA4BECC@tsd.neca.nec.com.au...
> Hi netters,
> I am using a perl cgi script to generate html file which uses
> server side includes. But the server is not processing SSIs in my
> html code written to stdout with mimetype text/html. I am not
> even getting the error usually we get for error in processing message.
>
> Is it possible to use SSI in html documents generated using
> CGI scripts?
>
> thanks in advance.
> sharma
>
>
------------------------------
Date: Mon, 7 Jun 1999 12:21:23 +0100
From: James Stewart <james@britlinks.co.uk>
Subject: Re: CGI and SSI in perl
Message-Id: <ant071123e61Lh==@ch0128.charis.co.uk>
Vincent Vanbiervliet <URL:mailto:vincent_vanbiervliet@be.ibm.com> wrote:
> Your server probably only looks for SSi for shtml files. This is for a
> faster response time, if every file (html, cgi, pl) would have to be parsed
> to look for SSI, this could slow down the server.
>
> So the only solution I see is to use Perl variables instead of SSI
> commands.
If the situation allows, you could save out to a .shtml file and redirect
to that.
James.
--
James Stewart - james@britlinks.co.uk | "Telecom ignored us and
The Britlinks - http://www.britlinks.co.uk | democracy has died."
Phantom Tollbooth - http://www.tollbooth.org | -- Fat And Frantic
Sixpence None The Richer in the UK - http://www.britlinks.co.uk/sixpence/
------------------------------
Date: 8 Jun 1999 01:39:55 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: CGI and SSI in perl
Message-Id: <slrn7ln5qm.v20.hasant@borg.intern.trabas.co.id>
On Mon, 07 Jun 1999 17:30:32 +1000,
Sharma Madiraju <sharma@tsd.neca.nec.com.au> wrote:
> Hi netters,
> I am using a perl cgi script to generate html file which uses
> server side includes.
> But the server is not processing SSIs in my
> html code written to stdout with mimetype text/html. I am not
> even getting the error usually we get for error in processing message.
This is actually for other ng.
But since you already asked here, I suggest you
to read your web server documentation. You'll
find out what the server needs to process an
__HTML SSI page__.
> Is it possible to use SSI in html documents generated using
> CGI scripts?
IMHO, if you have CGI scripts, then you don't need SSI.
And specially, if you have Perl to create CGI script,
why torture yourself?
-hasan-
uhm, no more sig(h)
------------------------------
Date: Mon, 07 Jun 1999 10:00:53 GMT
From: smnayeem@my-deja.com
Subject: Re: Coloring text in DOS console?
Message-Id: <7jg58j$jud$1@nnrp1.deja.com>
In article <7jftbb$h44$1@gatekeeper.ornano.kapt.com>,
"Fred Ruffet" <fruffet@kaptech.com> wrote:
>
> >> - How can I color the output of a Perl program in a MS-DOS shell.
> >> - How can I reposition the cursor in a MS-DOS shell.
>
> >Probably the same way that you do for a non-Perl program. You almost
> >certainly output some special codes that tell your system what you
want it
> >to do. The docs, FAQs, and newsgroups about MS-DOS may be able to
help you
> >here. Good luck!
>
> Right ! And, even if it's not a perl question, let me tell you that
typing
> "help" in a dos shell will help you. Note that Microsoft was a bit
more
> logic that it's now : you had to type "help" to get help, and not to
click
> "start" to stop your computer... Anyway, I don't remember which
command you
> need to look help on, but I know there's something about the escape
codes
> you need in the help on a command which deals with video modes or
something
> like that.
>
I tried checking the help files, but it doesnt say anything about
escapse sequences, I know escape sequences works with PCL but its not
working on the standard output. Anyone knows where i can find these
infos, maybe some links or soemting?
thanks
smnayeem
smnayeem@agni.com
> Good search !
>
> Fred
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 7 Jun 1999 10:09:38 +0200
From: "Fred Ruffet" <fruffet@kaptech.com>
Subject: Re: Determining height and with of uploaded Graphic files
Message-Id: <7jfuod$hoa$1@gatekeeper.ornano.kapt.com>
>> What graphic files ? GIFs, JPGs, BMPs, XPMs,...
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Is that relevant to solving the problem? That just seemed odd to me?
>
Well, excuse me, but I always forget that we need to download and use a big
module that is able to do many things just to do one. Is that necessary to
use a module that is able to determine size of any picture file format, just
to read one ?
Reusable code is all very well, but a thousand lines of code is not always
useful... :-)
Fred
"Search for perfection is all very well,
But to look for heaven, is to leave here in hell."
Sting
------------------------------
Date: 7 Jun 1999 10:40:09 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Determining height and with of uploaded Graphic files
Message-Id: <375b9379@newsread3.dircon.co.uk>
Fred Ruffet <fruffet@kaptech.com> wrote:
>>> What graphic files ? GIFs, JPGs, BMPs, XPMs,...
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>>Is that relevant to solving the problem? That just seemed odd to me?
>>
>
> Well, excuse me, but I always forget that we need to download and use a big
> module that is able to do many things just to do one. Is that necessary to
> use a module that is able to determine size of any picture file format, just
> to read one ?
> Reusable code is all very well, but a thousand lines of code is not always
> useful... :-)
>
The format of the files is nothing to do with Perl though - the answer
is either 'Use Image::Size' or it is off-topic (arguably). The same
would be said of someone asking how to determine the fields in some
database file - the answer would be 'use DBI' or the poster should
be pointed in the direction of somewhere that they can discover the
format of the file - of course once they have determined the format and
tried some code that they thought should work it becomes an on-topic
question again.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 7 Jun 1999 10:10:37 GMT
From: Vincent Ridderikhoff <madvin@dds.nl>
Subject: Re: Executing adduser?
Message-Id: <375B9A9D.14FC206E@dds.nl>
I want to thank everyone for the replies, it sure did help, it's working
great.
Greetz Vincent...
:-))
Vincent Ridderikhoff schreef:
> Hi,
>
> I want to execute adduser from perl, I first get the usernames and
> passwords from a file (which goes just great?) and the I need to pass
> them to the system() or the exec() function.but somehow this always give
> back an error, I don't know why. When I try to execute is without the
> variables $USER and $PASS and just pass static text (const. value) to
> the system() function al goes well, as soon as I use a variable it goes
> completly wrong.
>
> Greetz Vincent...
>
> :-))
------------------------------
Date: Mon, 07 Jun 1999 10:59:55 +0100
From: Matt Sergeant <matt-news@sergeant.org>
Subject: Re: Help - Convert ASP syntax to PERL
Message-Id: <375B981B.469BDF15@sergeant.org>
Gord MacSwain wrote:
>
> I would sure like to find a PERL substitue for the following ASP code:
>
> <%@ LANGUAGE="VBscript" %>
<%@ LANGUAGE="PerlScript" %>
> <% IF Request.FORM("pass") = "password" THEN
<%
use strict;
use vars qw/$Request $Response/;
if ($Request->Form('pass')->Item eq 'password') {
> Response.Redirect "yes.html"
$Response->Redirect('yes.html');
}
> ELSE
else {
> Response.Redirect "no.html"
$Response->Redirect('no.html');
> end IF %>
}
%>
Matt.
See http://come.to/fastnet for a complete guide to PerlScript + ASP.
------------------------------
Date: 8 Jun 1999 01:39:58 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Help needed and much appreciated
Message-Id: <slrn7ln6nj.v20.hasant@borg.intern.trabas.co.id>
On Mon, 07 Jun 1999 08:48:38 GMT,
Stuart Wright <stuw@dial.pipex.com.remove.everything.after.com> wrote:
> [snip]
> (I don't - I have to do perl programming about twice a year. I avoid it
> wherever possible !
I avoid to do non-perl programming whenever possible.
> After 10 years programming professionally for business
> apps, 90% of the perl I use is gobbledygook to me, and I do it the hard way
> with wordpad and uploading to a remote web server for testing.
'Cause you choose the hard way.
> If a script doesn't work, I comment out all the lines
> and uncomment each line,upload and test 'till I find the bug.
> It's usually an omitted semi-colon or squiggly bracket. Rediculous.
You're right, it's ridiculous to do so since Perl provides
perl -c script_name
to show you the exact line and token where you might
get wrong if any.
-hasan-
uhm, no more sig(h)
------------------------------
Date: Mon, 07 Jun 1999 17:18:41 +0530
From: Ranganath <rangagv@compucomtech.com>
To: efflandt@xnet.com
Subject: Re: Need help to File Upload in perl !
Message-Id: <375BB199.8ED9E7BA@compucomtech.com>
Can u tell me where i can find this perldoc CGI and CGI.pm .
David Efflandt wrote:
> On Fri, 04 Jun 1999 12:10:45 +0530, rangagv <rangagv@compucomtech.com> wrote:
> >Hi!
> >
> >I am trying to provide a facility for uploading doc files from my
> >website using perl!
> >i have a fair knowledge about perl.Can anyone help me and guide me how
> >to do it!
>
> perldoc CGI
> CGI.pm can help you generate the form and process the file upload.
>
> >Thanks in advance!
> >
> >GVR
>
> --
> David Efflandt efflandt@xnet.com
> http://www.xnet.com/~efflandt/
------------------------------
Date: Mon, 07 Jun 1999 09:17:33 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Perl "constructors"
Message-Id: <375b8d49.229245978@news.insnet.net>
On Sat, 05 Jun 1999 07:46:02 GMT, armchair@my-deja.com said:
>can you do this in Assembly?:
>
>TextArray a;
>returnCode = a.LoadFromTextFile("input.txt");
>a.RemoveBlankLines();
>cout << a;
Of course. How do you think your compiler does it? With pixie magic?
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Mon, 7 Jun 1999 10:31:32 +0100
From: "`V" <pdeeman@ibm.net>
Subject: PERL and SMTP
Message-Id: <375b8430@news.uk.ibm.net>
I could do with some help finding a Perl script that will accept form fields
and converting them into an email form.
I have, but this uses Sendmail from UNIX...it wont work with any other mail
server.
If the Perl script has a reference to Sendmail in it, then it is no good. It
usually asks you to insert the path to Sendmail in the script.
I need a script that just asks for the SMTP IP address or mail server name.
If you do manage to find one, it would make my current little insignificant
life a hell of a lot easier!!<grin>
Can anyone help me please.
Many Thanks
--
Paul Deeman
Deeman Computing
http://www.deeman.co.uk
pdeeman@deeman.co.uk
------------------------------
Date: Mon, 7 Jun 1999 10:22:39 +0100
From: "Nick Jones" <nick@namecity.com>
Subject: Perl JOB offer
Message-Id: <375b9139.0@nnrp1.news.uk.psi.net>
Perl expert needed familiar with Cobalt RaQ 2 HTML GUI and its back end
scripts.
We need someone to develop additional scripts to supplement the Cobalt
library to allow people to:
1) Change frameset and meta-refresh URL forwarding (or if you know a better
way with Apache redirect this would do :)
2) Allow "limited" editing of elements of the frameset - e.g. Title and meta
tags.
3) Configure wildcard email forwarding (c.f. having to specify one alias)
4) Develop branded pages.
Good rates of pay.
Please email nick@namecity.com or call +44 1252 336644
------------------------------
Date: Mon, 07 Jun 1999 08:22:27 GMT
From: keol@my-deja.com
Subject: Perl/RE savvy???
Message-Id: <7jfvfv$ias$1@nnrp1.deja.com>
Hi,
Being a fair beginner on both Perl and RE's, I'm trying to figure out
what is the most efficient way to write and use an RE for 'abbreviated'
commands; ie, consider that my program accepts the command 'describe'.
However, I'd like to accept abbreviations of that: 'des', 'desc',
'descr', 'descri', 'describ' and 'describe' should all be valid
alongside. Is it at all possible to write an efficient RE to evaluate
this?
Obviously, I could write '/^(des|desc|descr|descri|describ|describe)$/'
(which I guess is really the most efficient...) but shouldn't it be
possible to write it in a more compact way?
Hopefully, I'm just missing out on some basic RE technique here...any
suggestions most welcome...
TIA,
ken1
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 7 Jun 1999 12:57:02 +0200
From: "Robert Meppelink" <robert.meppelink@ict.nl>
Subject: Re: Regular Expressions
Message-Id: <7jg8d6$ttr$1@tasmania.dev.ict.nl>
slegarre@ireste.fr wrote in message <7jfqs1$g1g$1@nnrp1.deja.com>...
>Hello,
>
>I have a string of characters like bellow:
>
>125 Jean-Paul Gaultier 45 rue Champs Elysee 75 001 Paris
>
>I want to make some tests, on the first number(125).
>
>How regular expression can I use.
>I tried this one but it doesn't work:
>(.*?)(/d)
>
Try this one: /^(\d+)/ to check for a digit.
good luck
>Thank you for your answers
>
>Steven
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
------------------------------
Date: Mon, 7 Jun 1999 13:36:13 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: Regular Expressions
Message-Id: <375b9fea@news.uk.ibm.net>
Try the following:
.*?(/d*).*
Your solution only takes the first digit, not the first number, because you
don't have a quantifier specified.
Vincent
<slegarre@ireste.fr> wrote in message news:7jfqs1$g1g$1@nnrp1.deja.com...
> Hello,
>
> I have a string of characters like bellow:
>
> 125 Jean-Paul Gaultier 45 rue Champs Elysee 75 001 Paris
>
> I want to make some tests, on the first number(125).
>
> How regular expression can I use.
> I tried this one but it doesn't work:
> (.*?)(/d)
>
> Thank you for your answers
>
> Steven
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: 8 Jun 1999 01:39:47 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Regular Expressions
Message-Id: <slrn7ln4oe.v20.hasant@borg.intern.trabas.co.id>
On Mon, 07 Jun 1999 07:03:31 GMT,
slegarre@ireste.fr <slegarre@ireste.fr> wrote:
> Hello,
>
> How regular expression can I use.
> I tried this one but it doesn't work:
> (.*?)(/d)
Are you just guessing or you think it
comes from perlre document you read?
^^^^^^
-hasan-
uhm, no more sig(h)
------------------------------
Date: Mon, 07 Jun 1999 11:48:44 +0200
From: Andrzej Filip <anfi@bigfoot.com>
Subject: Re: Sending LOTS of Messages by Script
Message-Id: <375B957C.7930F05D@bigfoot.com>
Rick Freeman wrote:
> I'm in the process of modifying a home-rolled mailing list manager
> (written in Perl) which currently sends sendmail one message with all
> the recipients in the bcc field. The new version will send a separate
> message for each recipient to sllow for various kinds of
> personalization, like a one-click unsubscribe link.
>
> Right now I just open a pipe to sendmail and feed it the message. It
> would be very easy for me to do the same thing in a loop for each
> recipient in the new version, but I'm wondering if there is anything I
> should do differently as there will be so many messages sent all
> together (500 to 2000 messages in the current lists, though it should
> be able to grow to at least 5000 addresses.).
>
> It just seems like it might be wrong to open 2000 pipes to sendmail
> and send 2000 messages all at once??? or is it???
>
> Any advice appreciated,
> Rick
You have two basic options:
1) pipe one message to sendmail
started with -odd (deferred delivery)
sendmail will put the message into queue, DNS lookups will be done later
2) use some smtp speaking module to send all messages via
single tcp session to SMTP port or "sendmail -bs -odq"
(-bs speck smtp)
--
Andrzej (Andrew) A. Filip
http://www.bigfoot.com/~anfi
E-mail: anfi@bigfoot.com
I NO LONGER USE anfi@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
------------------------------
Date: 8 Jun 1999 01:39:44 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Setting Numlock in a Perl script
Message-Id: <slrn7ln43u.v20.hasant@borg.intern.trabas.co.id>
On Mon, 07 Jun 1999 00:21:19 -0500, Erich Douglass <erd@umr.edu> wrote:
> I'm writing this Perl appliation that takes input from the 10-Key keypad
> part of the keyboard. Since the script expects to get numbers as input
> when the keys are pressed, i have to manually turn on NumLock before i
> use the application. I was wondering if anyone knew of a Perl module or
> something that would let me turn on NumLock with a function call.
Try Term::ReadKey and probably other Term::*
from CPAN.
> Any help is appreciated... Please reply via e-mail.
I do reply via email. Now you can read it in this comp.lang.perl.misc
HTH,
-hasan-
uhm, no more sig(h)
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5909
**************************************