[15900] in Perl-Users-Digest
Perl-Users Digest, Issue: 3313 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 10 18:05:38 2000
Date: Sat, 10 Jun 2000 15:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <960674713-v9-i3313@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 10 Jun 2000 Volume: 9 Number: 3313
Today's topics:
Re: ANSI Perl: No Way !!! <godzilla@stomp.stomp.tokyo>
Re: ANSI Perl: No Way !!! (Neil Kandalgaonkar)
Re: ANSI Perl: No Way !!! <godzilla@stomp.stomp.tokyo>
Re: dbl quoting fields of a CSV file <h.camp@scm.de>
Re: DSN-less connection - How To? <jeff@vpservices.com>
Re: excluding certain domains in e-mails <vikingrscup@rogue-spear.com>
Re: excluding certain domains in e-mails <rootbeer@redcat.com>
Re: excluding certain domains in e-mails <dzapped@theramp.net>
Re: excluding certain domains in e-mails <rootbeer@redcat.com>
Re: excluding certain domains in e-mails <rootbeer@redcat.com>
Extracting hash elements based on an array (Philip Taylor)
Re: Extracting hash elements based on an array <rootbeer@redcat.com>
Re: Extracting hash elements based on an array (Philip Taylor)
Re: I am totally stuck on this one... (Tad McClellan)
Re: Is it possible: Dumping Package Method Names <rootbeer@redcat.com>
Re: Is it possible: Dumping Package Method Names (Neil Kandalgaonkar)
Re: Larry Rosler interview on perl.com! (Tad McClellan)
Re: Larry Rosler interview on perl.com! <tcuffel@exactis.com>
Re: logging in and adding <gellyfish@gellyfish.com>
Re: Moving from Unix to NT - sending mail <you.will.always.find.him.in.the.kitchen@parties>
Re: new CGI objects in same CGI script <tony_curtis32@yahoo.com>
Re: Newbie.. Sorry.. (Bart Lateur)
now this is strange... <raphaelp@nr1webresource.com>
Re: now this is strange... (Steven Smolinski)
Re: now this is strange... (Neil Kandalgaonkar)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 10 Jun 2000 14:04:06 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <3942AD46.5F417EEC@stomp.stomp.tokyo>
John from PUNY wrote:
(snipped with an attitude)
> LR: people should devote their attention to firming up the semantics
> and making sure that the implementation conforms to those semantics,
> rather than the other way around
> ME: No more swiss-army-chainsaw, :`(
Perl is dead and has been for years. The release of
Perl 5.x began the intonement of Perl's Death Knell.
Early on, Perl 4 was written for real programmers
who love a challenge and love to truly program. Our
Perl 5, is the end product of a molestation and rape
of Mother Perl 4. Today's Perl 5 amounts to nothing
more than incomprehensible garbage hieroglyphics
seemingly written by people who do not possess even
rudimentary Bonehead English skills. Perl 5 is a
mangled Pee Wee Big Adventure bicycle with wobbly
squared off training wheels missing a couple of nuts.
This lack of language skills, this turning pristine
Perl 4 in garbage hieroglyphics, is well reflected by
the documentation for Perl 5; it is incomprehensible
and appears to be written by one-hundred monkeys armed
with one-hundred typewriters, sans a lick of sense.
Further emphasis is place on this overall lack of
organization of Perl 5 by CPAN being a jungle of
Salvador Dali style structuring. Trying to find
simple basic information at CPAN takes hours of
searching and jumping through pretzel hula hoops
to find what should take only seconds. CPAN is a
data base on LSD; it's enough to make you suffer
hallucinations of a grandiose nature.
This grandiose nature is a direct reflection of
in-house battles of egos by self-proclaimed elitists
of Perl, supported by a staff of one-hundred monkeys.
This primate cabal, supposedly in charge of Perl,
amounts to nothing more than a Good Ol' Boys Club
populated by little boys looking to masturbate their
egos at the expense of purist programmers who don't
give a Scarlett O'Hara damn about ego satiation.
Those of us who are still purist programmers expend
a lot of effort compensating for all those bugs and
glitches inherent to Perl 5. Most annoying of all,
we purist programmers are put into a position of
having to write code which fools Perl 5 into doing what
we want, not what some maxed out zoom sissified geek
decided we should do with our programs and insist,
use strict.
Perl 5 modules, for the most part, are just roadside
litter of those geeks reflecting a decades old adage
in programming, GIGO; Garbage In, Garbage Out. Ever
notice how much, how very much code, is written to
make cgi.pm function as it should? God Bless our
Steve Brenner and his good common sense.
#local/geek/gigo/perl -w
Warning Will Robinson! Geekster Error at
line ten-thousand-three-hundred-fifty-two!
Really? Actually I left out a quote mark
at line three. Thanks anyhow -w. I am a
programmer, not a copy and paste geekster.
I know how to find my errors, correctly.
Perl 5 is a big fat slow gas guzzling high
operating expense Mercedes Benz driven by
Pee Wee while listening to ever so gag me
with a spoon boring half watt background
elevator music, with a Family Bible size
owner's manual written in ancient Oriental
caligraphy residing within its glove box,
a glove box with a lid which won't stay shut.
Perl 4 is a sleek five-hundred horsepower
classic Corvette Mako Shark which snorts
and rips up asphalt while spitting fire
out its tailpipes, driven by a James Dean
fashion Rebel Without A Cause listening to
Steppenwolf at an equal five-hundred watts
of rock and roll power. Mako Sharks have
no glove box for an owner's manual. Drivers
of Perl 4 know how to tune for neck snapping
wild performance.
Perl is dead just like James Dean. These docile
three piece suit geeks driving their Mercedes
Benz, have killed Perl and, yet to realize this,
being blinded by Ego.
Mother Perl 4 is dead like Janis Joplin.
Bury her and rock on.
Godzilla!
http://la.znet.com/~callgirl3/bornwild.mid
------------------------------
Date: 10 Jun 2000 21:15:43 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <8hub5v$hta$1@newsflash.concordia.ca>
In article <3942AD46.5F417EEC@stomp.stomp.tokyo>,
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>Perl is dead and has been for years.
[obviously trolling rant snipped]
Godzilla is a known troll: she does not respond to factual or logical
arguments, and is only trying to provoke flames. Usenet wisdom
suggests one should ignore trolls, except to correct factual errors.
Comp.lang.perl.misc trolls page coming, RSN...
--
Neil Kandalgaonkar
neil@brevity.org
------------------------------
Date: Sat, 10 Jun 2000 14:21:32 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <3942B15C.E3A0980C@stomp.stomp.tokyo>
Neil Kandalgaonkar wrote:
> Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
I will ask you to stop trolling and harassing
me. Your routine and frequent expressions of
hatred disrupt the harmony of this newsgroup.
Godzilla!
------------------------------
Date: 10 Jun 2000 20:57:14 GMT
From: H. Camphausen <h.camp@scm.de>
Subject: Re: dbl quoting fields of a CSV file
Message-Id: <8hua3a$bp$1@surz18.HRZ.Uni-Marburg.DE>
[F'up zu Brian McDonald's Posting vom Fri, 9 Jun 2000 15:44:57 -0700]
> I want to write a script that will read in each line, parse the
> comma-separated fields, put double quotes around each field that contains a
> string (all of them do for now), and reconstruct the line
Try this:
#!perl.exe -w
use strict;
my $in_file = 'path/to/your/file.ext';
my $out_file = 'path/to/your/output.file';
open (IN, "< $in_file") || die "Oops. Error opening $file: $!";
open (OUT, "> $out_file") || die "Oops. Error creating $file: $!";
foreach my $line (<IN>) {
$line =~ s/,/","/g;
print OUT, '"'.$line.'"',"\n";
}
cloes IN;
close OUT;
hth + mfg, Hartmut
--
CREAGEN Computerkram Fon: 06424/923826
Hartmut Camphausen Fax: 06424/923827
Kirchstraße 8 E-Mail: h.camp@creagen.de
35043 Marburg WWW: http://www.creagen.de
------------------------------
Date: Sat, 10 Jun 2000 12:50:50 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: DSN-less connection - How To?
Message-Id: <39429C1A.21DE14E5@vpservices.com>
Tom Bates wrote:
>
> I'm currently using the DBI and DBD-ODBC modules to connect to a
> Microsoft Access database on an NT server. Is there a way to set up a
> DSN-less connection with DBI? Or a way to specify the filename on the
> connection (which can be done in a VB program by specifying extended
> attributes)?
This URL is oriented to ADO, but the DSN-less connections it shows work
with DBD-ODBC also:
http://www.able-consulting.com/ADO_Conn.htm#ODBCDSN-LessConnections
--
Jeff
------------------------------
Date: Sat, 10 Jun 2000 21:29:53 +0200
From: "Viking" <vikingrscup@rogue-spear.com>
Subject: Re: excluding certain domains in e-mails
Message-Id: <8hu4ul$b8j$1@news0.skynet.be>
you could try this:
@deny = ('hotmail.com', 'zzn.net', etc..);
foreach $deny_email(@deny) {
&error if($in{'email'} =~ /\@${deny}/;
}
Z-man <dzapped@theramp.net> wrote in message
news:3942773E.404B2D49@theramp.net...
> Hi all,
> I have a registration script that requires an e-mail address what i'd
> like to do is exclude certain domains from registering i.e.
> someone@hotmail .com is this possable and if so how currently the
> e-mail part reads this
> &error("missing email address") if (!$in{'email'});
> &error("invalid email address") if ($in{'email'} !~ /\@/);
> any help appreciated
>
> Denis
>
------------------------------
Date: Sat, 10 Jun 2000 12:33:04 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: excluding certain domains in e-mails
Message-Id: <Pine.GSO.4.10.10006101227220.10286-100000@user2.teleport.com>
On Sat, 10 Jun 2000, Z-man wrote:
> Hi all, I have a registration script that requires an e-mail address
> what i'd like to do is exclude certain domains from registering i.e.
> someone@hotmail .com is this possable and if so how currently the
> e-mail part reads this
Please use a period or other suitable punctuation mark at the end of each
sentence, as doing so makes your text easier to read.
Perhaps you want to extract the domain name from the e-mail address, then
check it with a regular expression. But extracting the domain name isn't
always obvious; you should be sure to follow the RFCs or your code might
be misled by an address like this one, which is not at hotmail.com.
<fred&barney@redcat.com(not @hotmail.com!)>
Of course, there's no way to be sure that the e-mail isn't being forwarded
(manually or automatically) to a hotmail address, so you won't necessarily
be keeping hotmail.com addressees from subscribing, even if they can't
subscribe directly.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 10 Jun 2000 14:40:57 -0500
From: Z-man <dzapped@theramp.net>
Subject: Re: excluding certain domains in e-mails
Message-Id: <394299C9.C8AAD91@theramp.net>
Thanks for the reply now I have a stupid question ,I'm not all that great
with perl
I tried placing that both before and after the statements that I reviously
posted and get a doc contains no data.Am I putting it where I should be or
does it belong somewhere else..
Denis
Viking wrote:
> you could try this:
>
> @deny = ('hotmail.com', 'zzn.net', etc..);
>
> foreach $deny_email(@deny) {
> &error if($in{'email'} =~ /\@${deny}/;
> }
> Z-man <dzapped@theramp.net> wrote in message
> news:3942773E.404B2D49@theramp.net...
> > Hi all,
> > I have a registration script that requires an e-mail address what i'd
> > like to do is exclude certain domains from registering i.e.
> > someone@hotmail .com is this possable and if so how currently the
> > e-mail part reads this
> > &error("missing email address") if (!$in{'email'});
> > &error("invalid email address") if ($in{'email'} !~ /\@/);
> > any help appreciated
> >
> > Denis
> >
------------------------------
Date: Sat, 10 Jun 2000 12:58:45 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: excluding certain domains in e-mails
Message-Id: <Pine.GSO.4.10.10006101256150.10286-100000@user2.teleport.com>
On Sat, 10 Jun 2000, Viking wrote:
> you could try this:
>
> @deny = ('hotmail.com', 'zzn.net', etc..);
>
> foreach $deny_email(@deny) {
> &error if($in{'email'} =~ /\@${deny}/;
> }
What about this valid address, which isn't at hotmail.com?
<fred&barney@redcat.com(not @hotmail.com!)>
Or these hypothetical addresses:
<root@notmail-com.xyz.com>
<also_there@mail.hotmail.com>
<oops@hotmail.com.au>
Please, when parsing e-mail addresses, follow the RFCs. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 10 Jun 2000 12:59:35 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: excluding certain domains in e-mails
Message-Id: <Pine.GSO.4.10.10006101259151.10286-100000@user2.teleport.com>
On Sat, 10 Jun 2000, Z-man wrote:
> I tried placing that both before and after the statements that I reviously
> posted and get a doc contains no data.
When you're having trouble with a CGI program in Perl, here's a handy
troubleshooting guide to get you back on track.
http://www.smithrenaud.com/public/troubleshooting_CGI.html
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 10 Jun 2000 19:44:11 GMT
From: phil.taylor@bigfoot.com (Philip Taylor)
Subject: Extracting hash elements based on an array
Message-Id: <39429853.42192446@news.demon.co.uk>
I have an array which represents a list of player_codes. I also have a
player hash which contains a series of player records keyed by player
name.
The player record is a hash defined as:-
player{'player_code'}
player{'name'}
player{'age'}
I want to pull elements from the player hash based on the list of
player_codes in the array.
I have achieved this using some loops but the code seems clumsy. I
would be grateful for suggestions on how to achieve this in the most
efficient manner.
cheers
Phil
------------------------------
Date: Sat, 10 Jun 2000 13:08:08 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Extracting hash elements based on an array
Message-Id: <Pine.GSO.4.10.10006101306011.10286-100000@user2.teleport.com>
On Sat, 10 Jun 2000, Philip Taylor wrote:
> I want to pull elements from the player hash based on the list of
> player_codes in the array.
It sounds as if you want a slice:
my @elements = @player{ @fields };
Does that do anything for you? Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 10 Jun 2000 20:56:30 GMT
From: phil.taylor@bigfoot.com (Philip Taylor)
Subject: Re: Extracting hash elements based on an array
Message-Id: <3942a739.46007694@news.demon.co.uk>
On Sat, 10 Jun 2000 13:08:08 -0700, Tom Phoenix <rootbeer@redcat.com>
wrote:
>On Sat, 10 Jun 2000, Philip Taylor wrote:
>
>> I want to pull elements from the player hash based on the list of
>> player_codes in the array.
>
>It sounds as if you want a slice:
>
> my @elements = @player{ @fields };
>
>Does that do anything for you? Cheers!
mmmmm, not entirely on-board but I can see the general drift.
Am I correct in thinking the '@' on @player above is the slice
operator which allows you to specify the content of the slice on the
%player hash using the @fields array?
I'm not clear on what needs to go in the braces in place of @fields?
Does @fields act on the key or the value of the hash?
Just to clarify the example:-
%playerList - contains a list of player records keyed by name
%player - is the player record with the format:-
$player{'code'}
$player{'name'}
$player{'age'}
@playerCodes - is a list of player codes,
cheers
phil
------------------------------
Date: Sat, 10 Jun 2000 08:55:15 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: I am totally stuck on this one...
Message-Id: <slrn8k4elj.45o.tadmc@magna.metronet.com>
On Sat, 10 Jun 2000 11:46:44 GMT, jason <elephant@squirrelgroup.com> wrote:
>Steve Halpern writes ..
>>3. In the Perl Module that calls the exe, the command line that calls it
>>reads...
>> $filetorun = "./exefile"; (this is basically passed by another
^^
^^
You should either use an absolute path to the program, or
chdir() to where the program is.
In a CGI environment there is no guarantee as to what
your current working directory is.
>>script)
>> my $retval = "$filetorun $val1 $val2";
>
>you sure that the instructions don't say
>
> my $retval = `$filetorun $val1 $val2`;
>
>?? .. with backticks (under the tilde (~) on my keyboard)
If "retval" means "return value" then maybe it really means
"exit value", in which case it may be that the instructions
said:
my $retval = system "$filetorun $val1 $val2";
Using "return value" to mean "output" seems pretty strange,
as they are wildly different things...
Anyway, the OP should review the 3 ways of running external programs
(and read the "instructions" more carefully):
perldoc -q external
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 10 Jun 2000 12:18:45 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Is it possible: Dumping Package Method Names
Message-Id: <Pine.GSO.4.10.10006101213140.10286-100000@user2.teleport.com>
On 10 Jun 2000, Neil Kandalgaonkar wrote:
> If the module uses Exporter, examining @EXPORT, @EXPORT_OK, and %EXPORT_TAGS
> should give you a list of all public methods, whether autoloaded or not.
> (I think?)
Most OO modules shouldn't export their methods, so no. Oh, well!
But part of the _point_ of OO is that you should learn everything you need
to know about the class from its public interface - which, in Perl, is the
docs. If you need more than that, read the source!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 10 Jun 2000 20:59:09 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: Is it possible: Dumping Package Method Names
Message-Id: <8hua6t$hmv$1@newsflash.concordia.ca>
In article <Pine.GSO.4.10.10006101213140.10286-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> wrote:
>Most OO modules shouldn't export their methods, so no. Oh, well!
Oh dear, that was really brain-damaged of me to say. Comes from examining
CGI which has that functional/OO split personality and thinking about
two different ways of doing it simultaneously.
>But part of the _point_ of OO is that you should learn everything you need
>to know about the class from its public interface - which, in Perl, is the
>docs. If you need more than that, read the source!
Absolutely. I wonder why the OP wanted to do this. It might be a quick
way of making a template for writing docs.
(...goes back to finish reading Object-Oriented Perl).
--
Neil Kandalgaonkar
neil@brevity.org
------------------------------
Date: Sat, 10 Jun 2000 09:14:02 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <slrn8k4foq.45o.tadmc@magna.metronet.com>
On Sat, 10 Jun 2000 08:51:03 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:
>Steven Merritt wrote:
>
>>since there's little glory in re-writing docs and there is lots of
>>glory in adding new features, I don't see this happening."
>>We're seeing the same thing with some of the stuff going on with the
>>Perl core.
>
>When was the last time that you saw a new keyword appear in Perl's core?
>The only one for *years* that springs to my mind, is "our".
You can add features without adding a keyword (you give an
example of that yourself), so I don't see what keywords have
to do with anything.
Then there's the question of what is a "keyword"?
is "qr" a keyword? :-)
>What you're
>more likely to see, is new functionality for old functions, like the
>optional fourth parameter for substr().
new feature without new keyword.
>>I'm with Larry Rosler on this one, a standard, no matter who implements
>>it, would go a long way towards making Perl more useful in more
>>situations.
>
>By contrast, I'm with Ilya Z. *everything* should be fully documented.
>Behaviour that isn't documented, ought to be considered a bug.
I also agree with both of those (except the "no matter who" part).
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 10 Jun 2000 13:52:44 -0500
From: "Tim" <tcuffel@exactis.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <4Lw05.625$Ck1.32109@den-news1.rmi.net>
Henry wrote in message ...
>Perl's biggest failing is that since "There Is More Than One Way To Do
>It" no-one documents _anything_ for fear of being seen as dictatorial,
>and incurring the wrath of the community.
>
>This attitude has had a pronounced effect on the documentation, which
>reads like an arcane language reference and is almost INCOMPREHENSIBLE
>to a newbie. A proliferation of programming guides has attempted to
>address this issue, but the expectation is that FULL and COMPLETE
>documentation will ship with the product. And this simply isn't the
>case with Perl.
>
>Dump a standard distribution of Perl in front of a newbie and you'll see
>their eyes glaze over in a matter of minutes.
>
>Make better (more approachable) documentation, and more people will "use
>Perl;". An increase in numbers is analagous to an increase in mass.
>More mass means more inertia. More inertia translates to
>_functional_stability_. Functional stability results in industry
>acceptance.
>
>Companies don't really give a flying flock() about whether or not a
>programming language is ANSI certified, all they want to know is whether
>or not the applications they develop _today_ will continue to work
>_tomorrow_.
>
>You don't need artificial standards to do that, all you need is critical
>mass. Approachable documentation, shipped with the standard
>dstribution, will give us critical mass faster, and more efficiently,
>than any standard could ever hope.
Exactly.
I was in charge of a C++ compiler downgrade (gcc to HP :( ) a while
back. You know C++, that language with an ANSI standard? All the
things people are complaining about Perl, the mass of inpenetrable
docs, the poorly specified and incompletely implemented feature set,
everything came up.
And it was every worse than that. ANSI C++ specifies the language,
not the compiler. Finding an understanding the four flags that
control floating point round and truncation in one compiler, then
mapping them to the six flags on some other compiler that control that
same stuff in some completely different way, that's no picnic. At
least with "Perl is what perl does", you know -l will act the same
way everywhere.
-T
------------------------------
Date: 10 Jun 2000 19:48:28 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: logging in and adding
Message-Id: <8hu2hs$kjb$1@orpheus.gellyfish.com>
On 10 Jun 2000 00:49:46 GMT HaCkeRz45 wrote:
> can someone help me ? how do i make it so someone can log in to there username
> on my web site then beable to post stuff in like a post board on my site or
> something like that? If u can email me at hackerz45@aol.com i will be great
> fully appreciated!
I would recommend you use a good search engine to find this.
/J\
--
fortune oscar homer
------------------------------
Date: Sun, 11 Jun 2000 08:37:29 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Moving from Unix to NT - sending mail
Message-Id: <960669348.93306@shelley.paradise.net.nz>
"Tom Bates" <tfbiv@erols.com> wrote in message
news:73l4kssspu1rjfoofob22pl6sjjj3qv6rq@4ax.com...
> On Wed, 07 Jun 2000 21:18:51 GMT, newsmay2000@ordinate.co.uk (Ben
> Hambidge) wrote:
>
> >I have to move my CGI script from a Unix web server to a WinNT server.
> >I send mail by piping to /usr/lib/sendmail using
> >open(MAIL,"|/usr/lib/sendmail $recipient");
> >
> >What do I need to do to acheive the same effect in Windows?
>
>
> I've used BLAT with great success.
Please remember that BLAT != sendmail. You need to change all the flags and
method that you call BLAT.
------------------------------
Date: 10 Jun 2000 13:24:14 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: new CGI objects in same CGI script
Message-Id: <87k8fxe6nl.fsf@limey.hpcc.uh.edu>
>> On Sat, 10 Jun 2000 17:19:20 GMT,
>> Brian Alexander Booden <ceebb@cee.hw.ac.uk> said:
> I am trying to create a new CGI object in a Perl script.
> Currently, my script generates an HTML table of results
> from a Perl array called @results. However, after i get
> this table of results, i want the user to be able to
> send results to themselves by e mail. my question is
> how do i set up a button (or can i) so thati can call a
> function in the same CGI script (say the function is
> called sendit)? Bearing in mind that i need all of the
> Perl arrays i have created so far, so calling another
> script althoug h easier, wouldnt solve my problem
When the CGI program has finished returning its output
(e.g. HTML) back to the client, it goes away = terminates.
So it wouldn't be the same process handling the mail
sending, it would or could be the same program invoked a
second time. You can set a parameter in this mail link
(e.g. through use of a <form> with <hidden> fields) to
tell the program which actions it should take (generate
results or mail them to a specified address).
Just look at a param() you define in the HTML to tell you
what to do in the program.
hth
t
--
"Trying is the first step towards failure"
Homer Simpson
------------------------------
Date: Sat, 10 Jun 2000 19:34:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Newbie.. Sorry..
Message-Id: <394397ec.368217@news.skynet.be>
Russ Jones wrote:
>A free editor with all the features Bart mentioned, including syntax
>highlighting for a ton of languages as well as Perl, is vim (vi
>improved). It's available for Windows, Unix, probably other platforms.
>It works just like vi; some consider that a plus, others don't.
I don't. NOT AT ALL! I even like Notepad better than vi. Thank goodness
it's not the only editor available with those features.
--
Bart.
------------------------------
Date: Sat, 10 Jun 2000 20:15:01 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: now this is strange...
Message-Id: <8hu0if$iqv$1@news.online.de>
I have quite a few variables that need to be defined:
$autoresp_state = $FORM{autoresp_state};
$autoresp_from = $FORM{autoresp_from};
$autoresp_spam = $FORM{autoresp_spam};
$admin_state = $FORM{admin_state};
$admin_from = $FORM{admin_from};
$admin_sort = $FORM{admin_sort};
$results_message = $FORM{results_message};
$results_template = $FORM{results_template};
$results_cartoon = $FORM{results_cartoon};
$results_results = $FORM{results_results};
$results_link_text = $FORM{results_link_text};
$results_link_url = $FORM{results_link_url};
Now, what I want is to shorten this. I came up with an Idea, but this $h!t
just doesn't want to work... :-)
foreach $key (keys(%FORM)) {
$key = $FORM{$key};
}
I'm more than stranded here. It took me ages to find a possible solution and
now it doesn't work! :-(
Could anyone point me into the right direction? (please feel free to
underestimate my IQ... :-)
Regards,
Raphael
------------------------------
Date: Sat, 10 Jun 2000 18:41:19 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: now this is strange...
Message-Id: <slrn8k52tk.6u8.sjs@john.sympatico.ca>
Raphael Pirker <raphaelp@nr1webresource.com> wrote:
>I have quite a few variables that need to be defined:
>$autoresp_state = $FORM{autoresp_state};
>$autoresp_from = $FORM{autoresp_from};
[...]
Why not just use %FORM? If you can't, why not just copy
%FORM to your own hash table?
my %vars = %FORM;
Steve
------------------------------
Date: 10 Jun 2000 21:59:01 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: now this is strange...
Message-Id: <8hudn5$gb6$1@newsflash.concordia.ca>
In article <8hu0if$iqv$1@news.online.de>,
Raphael Pirker <raphaelp@nr1webresource.com> wrote:
>I have quite a few variables that need to be defined:
>
>$autoresp_state = $FORM{autoresp_state};
>$autoresp_from = $FORM{autoresp_from};
>$autoresp_spam = $FORM{autoresp_spam};
[...]
>Now, what I want is to shorten this. I came up with an Idea, but this $h!t
>just doesn't want to work... :-)
>
>foreach $key (keys(%FORM)) {
>$key = $FORM{$key};
>}
>
>I'm more than stranded here. It took me ages to find a possible solution and
>now it doesn't work! :-(
I think you wanted $key as used in the for loop to magically be treated
as $autoresp_state, etc. Perl can't know you want to do this. If $x = "foo",
$x has no relationship with $foo.
Anyway, there is nothing wrong with $FORM{'autoresp_state'}, you can use it
almost anywhere you would use $autoresp_state.
There *are* ways to do what you wanted but they are usually very very bad
ideas.
See <http://www.plover.com/~mjd/perl/varvarname.html>.
--
Neil Kandalgaonkar
neil@brevity.org
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 3313
**************************************