[8329] in Perl-Users-Digest
Perl-Users Digest, Issue: 1946 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 21 05:07:46 1998
Date: Sat, 21 Feb 98 02:00:34 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 21 Feb 1998 Volume: 8 Number: 1946
Today's topics:
Re: 5.004 bug? invisible object dereferencing (Ilya Zakharevich)
Re: 5.004 bug? invisible object dereferencing (Ilya Zakharevich)
Re: 5.004 bug? invisible object dereferencing <zenin@best.com>
Ads site Perl needed drnkl@ibm.net
Ads site, CGI for search drnkl@ibm.net
Re: Avoiding $` <rjk@coos.dartmouth.edu>
Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et <dformosa@st.nepean.uws.edu.au>
Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et (Robert F. Harrison)
Cacheing and Back Button question. <ldn123NOSPAM@pobox.com>
CGI script for ads site drnkl@ibm.net
CGI script for ads site drnkl@ibm.net
Re: CGI.pm error - Modification of Read-Only Value (Jonathan D. Feinberg)
Re: differences perl 4.0.1.8 -> 4.0.3.6 <rjk@coos.dartmouth.edu>
for my $i (...) doesn't work on Win32? (John Brownie)
Re: HELP! exec doesn't work properly! <carton.lao@shaw.wave.ca>
Re: if (-d $filename) in Win32 dennis_marti@yahoo.com
Re: if (-d $filename) in Win32 <rjk@coos.dartmouth.edu>
Re: INTERNAL SERVER ERROR - Help??? (Jonathan Feinberg)
Need CGI programmer, search drnkl@ibm.net
Need CGI programmer, search drnkl@ibm.net
perl for mailing list management wanted Juntung Wu
Perl for Windows 95 amerar@unsu.com
Re: Perl for Windows 95 <markl@sa.apana.org.au>
Please Help: Can't run WindMail.exe from PerlScript (Fritz Knack)
Re: Q: scalar @{[/$f/g]} <tchrist@mox.perl.com>
Re: Seven Levels of Perl Mastery (humor) <webmaster@fccj.cc.fl.us>
Re: Sort help please! <palincss@nicom.com>
Re: Turning off -w for single third-party module ($^W.. <rjk@coos.dartmouth.edu>
Re: Using Perl to encrypt credit card numbers at Web si <shareware@erols.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 Feb 1998 06:28:27 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: 5.004 bug? invisible object dereferencing
Message-Id: <6cls6b$csi$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Zenin
<zenin@best.com>],
who wrote in article <888031305.516107@thrush.omix.com>:
> From the perldsc manpage, in the third paragraph of the "REFERENCES"
> subsection we find:
> "Briefly, references are rather like pointers that know
> what they point to."
>
> From the perlref manpage, item 5 under the "References can be
> constructed in several ways" header we find:
> "References are often returned by special subroutines
> called constructors. Perl objects are just references
> to a special kind of object that happens to know which
> package it's associated with."
>
> From the perlobj manpage, under the "An Object is Simply a
> Reference" section we find in paragraph 2:
> "This is for convenience, because the referenced object
> itself knows that it has been blessed, and the reference
> to it could have been returned directly, like this:"
>
> "Know what they point to", "happens to know which package it's
> associated with.", "the referenced object itself knows that it has
> been blessed"... It sure sounds to me like a reference holds far
> more then a pointer which, indirectly, it kinda does.
No, it does not sound like this. It is written to *emphasize* that
the additional info is associated with the *referenced object*, not
the reference itself.
True, it
> doesn't actually store this itself, it must look up the thingy type
> it references and check sv_flags for type info, but this is just
> semantics when looked at from the Perl user end.
Absolutely wrong. What do you thing this will print:
$a = 1;
$b = \$a;
$c = \$a;
bless $b, 'B';
bless $c, 'C';
print ref $b;
Ilya
------------------------------
Date: 21 Feb 1998 06:32:21 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: 5.004 bug? invisible object dereferencing
Message-Id: <6clsdl$csi$2@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Zenin
<zenin@best.com>],
who wrote in article <888031305.516107@thrush.omix.com>:
> Please correct me if I'm wrong (I'm sure you will:-), but I don't
> see where else the object type would be stored except in the
> SV holding the reference?
This is what Devel::Peek is for:
perl -MDevel::Peek -e "$a=1; Dump bless \$a, 'A'"
SV = RV(0x7fc08)
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x4e02c
SV = PVMG(0x4f3e0)
REFCNT = 2
FLAGS = (OBJECT,IOK,pIOK)
IV = 1
NV = 1
PV = 0
STASH = 0x4e0a4 "A"
(It looks like the indentation could be better, I need to fix it...)
Ilya
------------------------------
Date: 21 Feb 1998 08:34:25 GMT
From: Zenin <zenin@best.com>
Subject: Re: 5.004 bug? invisible object dereferencing
Message-Id: <888050309.513030@thrush.omix.com>
[ posted & mailed ]
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>snip<
: No, it does not sound like this.
"references are rather like pointers that know what they point to"
^^^^^^^^^^^^^^^^^^^^^^^
Sorry, to me it still sounds like it holds more info then just
a pointer. Not that it does (you're post with Devel::Peek clearly
shows this), it's just that many statements like the above that
run thoughout the docs make it sound like it's this way, at least
to me.
Me thinks the docs need to be revisited. :-)
: It is written to *emphasize* that
: the additional info is associated with the *referenced object*, not
: the reference itself.
The docs state, many times, that an object is simply a blessed
reference, and thus since "additional info is associated with
the *referenced object*", and being that (from the doc's point
of view) an object is simply a special reference, the reference
then by it's nature must hold the "additional info".....
Of course it doesn't, I see that now, but can you see how this can
be misleading?
I think the perlguts page needs more concise information about the
exact stucture and layout of the data types. I got almost nothing
useful out of it as far as type stucture is concerned, and diving
into the source didn't help too much as it's littered for days with
macros that hide much of the deep internals. Not that they are bad,
I'm sure they make working on the perl source much easier, but they
sure don't help understanding it IMH0. -Which is why I'd like to
see more info in the guts page. Devel::Peek looks like a good tool
for understanding the internals, and I'll play around with it some
more for sure. -I think the perlguts page should at least mention
it as well, it probably would have saved me some embarrassment. :-)
--
-Zenin
zenin@best.com
------------------------------
Date: Sat, 21 Feb 1998 03:20:51 -0600
From: drnkl@ibm.net
Subject: Ads site Perl needed
Message-Id: <6cm69j$as0$1@nnrp1.dejanews.com>
I am running a free ads site http://www.greekads.com
The search is in English and in Greek. The FP98 bot is not doing a good job.
My programmers are not doing a good job either. Can someone take a look,
offer recommendations and a quotation (your fees) please. This is part of a
very large job, 30 web sites times n.
As I said, do not bother to reply unless you know your job, please.Thanks,
Dr. Nichols
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 21 Feb 1998 03:18:57 -0600
From: drnkl@ibm.net
Subject: Ads site, CGI for search
Message-Id: <6cm660$aon$1@nnrp1.dejanews.com>
I am running a free ads site http://www.greekads.com
The search is in English and in Greek. The FP98 bot is not doing a good job.
My programmers are not doing a good job either. Can someone take a look,
offer recommendations and a quotation (your fees) please. This is part of a
very large job, 30 web sites times n.
As I said, do not bother to reply unless you know your job, please.Thanks,
Dr. Nichols
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 21 Feb 1998 02:08:54 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Avoiding $`
Message-Id: <34EE7D88.32DC4724@coos.dartmouth.edu>
Joe Gottman wrote:
>
> [discussion of getting the equivalent of $`, $&, and $' in $1, $2, and $3]
>
> so I think the best way to get all three is
> /^(.*?)(a+)(?=(.*\n?))/g
>
> The \n? should pick up the the trailing newline at the end of the string if there
> is one.
The .*? at the beginning won't match newlines. This will cause the entire
match to fail if a+ would have matched somewhere after a newline.
The .* at the end also won't match newlines. This will cause $3 to be missing
everything after the next newline.
/^([\x00-\xFF]*?)(a+)(?=([\x00-\xFF]*))/;
That solution doesn't require using /s, which could potentially change of the
meaning of the key part of the regex. That would be bad.
DB<1> $_ = "foo\nbar\nbaz"
DB<2> @a = /^([\x00-\xFF]*?)(a+)(?=([\x00-\xFF]*))/
DB<3> x @a
0 'foo
b'
1 'a'
2 'r
baz'
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: 21 Feb 1998 05:13:14 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <888037992.740260@cabal>
In <34f1445d.4580909@news.tornado.be> bart.mediamind@tornado.be (Bart Lateur) writes:
[...]
>Why not create a censored version. Something like
> RT*M
I would recomend RT.*M
--
Please excuse my spelling as I suffer from agraphia see the url in my header.
Never trust a country with more peaple then sheep.
Support NoCeM http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: 21 Feb 98 08:22:45 GMT
From: harrison@pixi.com (Robert F. Harrison)
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <slrn6et3m9.ft8.harrison@localhost.localdomain>
On 21 Feb 1998 05:13:14 GMT, <dformosa@st.nepean.uws.edu.au> wrote:
> In bart.mediamind@tornado.be (Bart Lateur) writes:
>
> >Why not create a censored version. Something like
>
> > RT*M
>
> I would recomend RT.*M
Give up already. RTFM has been deprecated by the new GTTM (Give That
To Me) standard. Arguing over the meaning of RTFM is as
stupid as reading manuals and FAQs. In the old days you had to be
careful and do things correctly because of the hardware limitations.
It's now possible to create entire operatings systems, lets say Win32
for example, without studying at all. Get a life.
--
rfh harrison@pixi.com
------------------------------
Date: Fri, 20 Feb 1998 23:26:23 -0500
From: Remove NOSPAM to reply <ldn123NOSPAM@pobox.com>
Subject: Cacheing and Back Button question.
Message-Id: <34EE576E.A70E247E@pobox.com>
Hello. I've been trying without luck to figure out how to prevent the
user from using the back button from a certain page.
My problem is that I have form that is used for editing the
state of something. A perl script handles the POST method
and generates a new version of the form with each interaction.
If I allow the user to use the back button, then they will be
able to step back to a previous version of the form, which
will contain out of date state information.
I have tried using Pragma: no-cache, and also using the
Expired header with both "0" and an old date as
Content. They only work intermittently in Netscape 4.04.
I would like to write a Java applet to handle this
situation, but unfortunately the client doesn't like
Java. Any suggestions would be appreciated.
Thank you,
Lee Nelson
------------------------------
Date: Sat, 21 Feb 1998 03:10:17 -0600
From: drnkl@ibm.net
Subject: CGI script for ads site
Message-Id: <6cm5lq$ahm$1@nnrp1.dejanews.com>
I am running a free ads site http://www.greekads.com
The search is in English and in Greek. The FP98 bot is not doing a good job.
My programmers are not doing a good job either. Can someone take a look,
offer recommendations and a quotation (your fees) please. This is part of a
very large job, 30 web sites times n.
As I said, do not bother to reply unless you know your job, please.
Thanks,
Dr. Nichols
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 21 Feb 1998 03:10:17 -0600
From: drnkl@ibm.net
Subject: CGI script for ads site
Message-Id: <6cm5mp$9h9$1@nnrp2.dejanews.com>
I am running a free ads site http://www.greekads.com
The search is in English and in Greek. The FP98 bot is not doing a good job.
My programmers are not doing a good job either. Can someone take a look,
offer recommendations and a quotation (your fees) please. This is part of a
very large job, 30 web sites times n.
As I said, do not bother to reply unless you know your job, please.
Thanks,
Dr. Nichols
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 21 Feb 1998 06:24:06 GMT
From: jdf@crc3.concentric.net (Jonathan D. Feinberg)
Subject: Re: CGI.pm error - Modification of Read-Only Value
Message-Id: <6clru6$8so@examiner.concentric.net>
In article <6cl98i$fu6$1@gte2.gte.net>, Michael Roeser wrote:
> "...got line "modification of a read-only value attempted at
> /usr/freeware/lib/perl5/cgi.pm line 308"
> 308 ${$var} = $value[0];
Are there any form elements on your page named "1" or "2," or perhaps "."
or something similar?
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Sat, 21 Feb 1998 01:56:50 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: differences perl 4.0.1.8 -> 4.0.3.6
Message-Id: <34EE7AB3.88DF659B@coos.dartmouth.edu>
Zenin wrote:
>
> Perl 4 (even 4.0.3.6) is not y2k compliant. Upgrade them to
> 5.00404. :-)
It's one thing to say "There are no plans to make Perl4 Y2K compliant." It's
quite another to say "Perl4 is not Y2K compliant."
So, how exactly is Perl4 not Y2K compliant?
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: Sat, 21 Feb 1998 09:15:24 +0200
From: john.brownie@pp.inet.fi (John Brownie)
Subject: for my $i (...) doesn't work on Win32?
Message-Id: <john.brownie-ya02408000R2102980915240001@news.inet.fi>
I took a working MacPerl script and tried it on the ActiveState port on
Windows 95, and it complained about all the "for my $i (...)" constructs,
claiming that there was a missing $ on the for variable. Removing the "my"
made it work, but then I had to declare a useless my variable in
surrounding code (I'm using strict) to get it to work.
Is this a known problem with Win32? I couldn't find anything in the FAQ.
Is it a difference between 5.003 and 5.004?
I can live with this, but I'd like to know why.
Thanks,
John Brownie
------------------------------
Date: Sat, 21 Feb 1998 00:28:44 GMT
From: Carton Lao <carton.lao@shaw.wave.ca>
To: Lance <"change AT into "@>
Subject: Re: HELP! exec doesn't work properly!
Message-Id: <34EE2114.6B58D195@shaw.wave.ca>
close( jj );
will properly close off the file and make it ready for use.
Carton Lao
Lance wrote:
> Hi,
>
> I have the following lines in a perl script on HP-UX:
>
> open(jj,">junk") || die "Couldn't open junk: $!\n";
> print jj <<EOF; # line A
> 1
> 1
> 0
> 4
> 0
> 5
> 0
> 0
> EOF
> exec "trans.x < junk"; # line B
>
> Note: "trans.x" is a Fortran executable file which uses "junk" as a
> redirected input file
> But it just doesn't work! line A does generate the file "junk", but line B
> not only doesn't recognize "junk" but also makes it null.
>
> If I comment line B and run the rest. It generates "junk". And then I
> uncomment line B and comment the rest of it. (so "junk" already exits) and
> run it. Line B works! I don't understand why they can't work together.
>
> Since I'm new in Perl Programming, this could be a dumb question.
> Any advice will be greatly appreciated!
>
> --
> Regards,
> Lance
> lsjATbnl.gov
------------------------------
Date: Sat, 21 Feb 1998 00:59:51 -0600
From: dennis_marti@yahoo.com
Subject: Re: if (-d $filename) in Win32
Message-Id: <6clu17$2la$1@nnrp1.dejanews.com>
In article <34ee9cff.25817503@news.rsv.rsv.se>,
perl.user@sndk.se wrote:
>
> Why isn't the following ok in Win32? Is -d only working in unix perl?
> I want to scan the whole of d:\ for perl-files (extension "pl").
...
> while (defined($filename = readdir(HOMEDIR)))
...
> if ((-d $filename) and !($filename eq '.' or $filename eq '..'))
readdir() returns a filename, not a complete path. -d checks against files
available in the current directory, but that isn't where $filename is. You can
either keep track of subdirectories and test with the complete path, chdir to
the directory you're testing or use File::Find. It'll do what you want.
Dennis Marti
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 21 Feb 1998 02:32:18 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Cameron Kaiser <cdkaiser@concentric.net>
Subject: Re: if (-d $filename) in Win32
Message-Id: <34EE8305.1373EE83@coos.dartmouth.edu>
[posted and mailed - despite annoying munged address]
Cameron Kaiser wrote:
>
> perl.user@sndk.se writes:
>
> Let's clean this up a bit ...
>
> > while (defined($filename = readdir(HOMEDIR)))
>
> while($filename = readdir(HOMEDIR)) {
Hmm... I wonder what that would do if I had a file named 0 (zero)...
~/foo> ls
0 abc fljgfa
~/foo> perl -e \
'opendir(DIR, ".") or die; while ($file=readdir(DIR)) {print "$file\n"}'
.
..
abc
~/foo>
Cleaning up code is good, but try not to break it.
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: Wed, 18 Feb 1998 10:21:27 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: INTERNAL SERVER ERROR - Help???
Message-Id: <MPG.f54c685848ba97f9896f9@news.concentric.net>
[courtesy cc of this posting sent to cited author via email]
pschmitt@astronpub.com said...
: I am running Selena Sol's Form Processor. All permissions and links are
: correctly set per installation instructions. I could use some ideas. I am
: stumped. Any help would be appreciated.
You'll most likely find that help in one of the following places. This group
is for the discussion of Perl language issues.
[This list courtesy of Tom Christiansen.]
The CGI Newsgroup (NOT THIS ONE):
comp.infosystems.www.authoring.cgi
CPAN's Web-related modules in Perl:
http://www.perl.com/CPAN/modules/by-
category/15_World_Wide_Web_HTML_HTTP_CGI/
The Idiot's Guide to solving Perl/CGI problems
http://www.perl.com/perl/faq/idiots-guide.html
Perl FAQs
http://www.perl.com/CPAN/doc/FAQs/
Perl Manpages (old)
http://www.perl.com/CPAN/doc/manual/html/
CGI FAQ
http://www.webthing.com/page.cgi/cgifaq
WWW Security FAQ
www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
Web FAQ
http://www.boutell.com/faq/
HTTP Spec
http://www.w3.org/pub/WWW/Protocols/HTTP/
HTML Spec
http://www.w3.org/pub/WWW/MarkUp/
CGI Spec
http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
--
#!/usr/bin/perl -w -- Just another Perl hacker,
(open 0),$_=<0>,s,.*-+ ,,,chop;for(split?@*?){($$_++or$}=$_,y,
y \,y,<STDIN>,,eval"sub $_ {print'$}'}"),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Sat, 21 Feb 1998 03:14:14 -0600
From: drnkl@ibm.net
Subject: Need CGI programmer, search
Message-Id: <6cm5t5$aie$1@nnrp1.dejanews.com>
I am running a free ads site http://www.greekads.com
The search is in English and in Greek. The FP98 bot is not doing a good job.
My programmers are not doing a good job either. Can someone take a look,
offer recommendations and a quotation (your fees) please. This is part of a
very large job, 30 web sites times n.
As I said, do not bother to reply unless you know your job, please.Thanks,
Dr. Nichols
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 21 Feb 1998 03:14:14 -0600
From: drnkl@ibm.net
Subject: Need CGI programmer, search
Message-Id: <6cm5u4$9ok$1@nnrp2.dejanews.com>
I am running a free ads site http://www.greekads.com
The search is in English and in Greek. The FP98 bot is not doing a good job.
My programmers are not doing a good job either. Can someone take a look,
offer recommendations and a quotation (your fees) please. This is part of a
very large job, 30 web sites times n.
As I said, do not bother to reply unless you know your job, please.Thanks,
Dr. Nichols
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 20 Feb 1998 15:25:28 -0800
From: Juntung Wu
Subject: perl for mailing list management wanted
Message-Id: <6cl3d8$pq0@drn.newsguy.com>
Hi,
I have a not-for-profit mailing list (ran with Majordomo) which has a lot of
e-mail addresses from the same domain (e.g., kcl.ac.uk).
I currently use a perl script which reduces the amount of traffic that it
generates by bundling several e-mail messages into one. (E.g., instead of
sending 60 messages to kcl.ac.uk, it sends one message with 60 addresses
attached to kcl.ac.uk, and asks kcl.ac.uk to distribute the e-mails at their
end.) It greatly reduces the amount of traffic generated.
But the person who wrote the script is refusing to renew my license for it and
wants to charge an outrageous price for the rights to it, but my mailing list
isn't for profit and I can't afford it.
Is there a perl script out there on the Internet which does these things? Is it
possible for someone to write a similar one? I'll try to spare some money from
my savings to pay for it.
Juntung Wu (JT)
e-mail: univ0555@sable.ox.ac.uk
------------------------------
Date: Fri, 20 Feb 1998 23:35:28 -0600
From: amerar@unsu.com
Subject: Perl for Windows 95
Message-Id: <6clp30$tne$1@nnrp1.dejanews.com>
Hello,
I just installed Perl for Windows 95. I am used to coding my Perl script,
sending it to the Unix server and testing it there.
I'm not quite sure how to use this version of Perl. If I code a script, and
use call it from an HTML document on my local machine, will it execute? If
not, what do I need to do so it will execute as if it was on the net?
Thank you for your help,
Arthur
amerar@unsu.com
http://www.unsu.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 21 Feb 1998 18:15:04 +1030
From: Mark Little <markl@sa.apana.org.au>
Subject: Re: Perl for Windows 95
Message-Id: <34EE8600.99BAF769@sa.apana.org.au>
Probably the best way to go is to install a web server on your system
and use it to test your Perl programs. There are quite a few web servers
which you can use for this purpose. I'm currently using Xitami, but
there are plenty of other servers around which will do what you want.
Mark.
amerar@unsu.com wrote:
>
> Hello,
>
> I just installed Perl for Windows 95. I am used to coding my Perl script,
> sending it to the Unix server and testing it there.
>
> I'm not quite sure how to use this version of Perl. If I code a script, and
> use call it from an HTML document on my local machine, will it execute? If
> not, what do I need to do so it will execute as if it was on the net?
>
> Thank you for your help,
>
> Arthur
> amerar@unsu.com
> http://www.unsu.com
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 20 Feb 1998 15:42:17 GMT
From: fritz.knack@nospam.POPULUS.net (Fritz Knack)
Subject: Please Help: Can't run WindMail.exe from PerlScript
Message-Id: <34eda119.10015978@cnews.newsguy.com>
Keywords: NT WindMail CGI IIS Perl PerlScript Win32
[Initially crossposted to comp.lang.perl.misc, but followups
*probably* belong in comp.infosystems.www.servers.ms-windows. --Fritz]
I'm having some major problems getting windmail to work from my CGI
app, and I just can't seem to figure out why. I've scoured DejaNews,
and seen lots of things to check--which I have--but none of them have
helped. I think I've done my homework (about which details follow),
and I'm pretty sure the problem can be summarized as "How do I get
.EXE files to run from PerlScript?" The code below *always* launches
the mail_failure subroutine and *never* sends an email.
Help, suggestions, and (please please please!) working code snippets
you might have lying around would be most appreciated.
The app
-------
Simple enough: Take user-entered information, reformat it, and mail it
off.
Details
-------
WindMail 3.01e
PerlScript, latest build (315) of the latest version (5.003?) and
matching Perl for Win32 build.
IIS 2 with lots of IIS 3 upgrades, so most things think it's version
3.
NT 4.0.
What works
----------
The script itself executes. I can take the query string, read it,
parse it, work with it, and print out a new page using the results.
The mail_failure subroutine below and the echo_user_input routine it
calls both work just fine.
This should rule out the vast majority of CGI and NT-configuration
problems that I've seen solved in the USENET archives including:
directory permissions, headers, ScriptMap things, file assosciations,
etc.
The same extracted code works fine from the command line, which should
rule out imprpoper WindMail installation.
Other specifics
---------------
I've tried granting FullControl permissions to Everyone in the
WindMail directory including subs.
Even though I've verified that the WindMail directory is in the
%PATH%, I've tried calling WindMail with the full path specification.
What doesn't work
-----------------
As far as I can tell, WindMail isn't ever being called. There's
nothing in the event log to indicate that it even tried. What I
suspect may be related--but I'm not sure how--is that the POST method
wouldn't work for the calling page: I had no "environment" to parse
for CGI information, although I could still get to Win32 environment
variables. For example,
<% $path_string = Win32::ExpandEnvironmentStrings '%Path%'; %>
gave me the path (including the WindMail directory), but
<% $content_length = Win32::ExpandEnvironmentStrings
'CONTENT_LENGTH'; %> (with or without the surrounding %'s) gave me the
string I passed it (i.e., $content_length eq 'CONTENT_LENGTH').
Emphasized Plea for Help
------------------------
I'm at my wit's end here. I strongly suspect I've missed something
relatively simple, but damned if I know what it is. Anyone?
Best Regards,
Fritz Knack
CONXUS(tm) Communications, Inc.
---abbreviated code starts here-------------
<html>
<head>
<title>Page Title</title>
</head>
<body>
<%@ LANGUAGE = PerlScript%>
<%
#*************************************************************
sub mail_failure { %>
<h2>Mail Engine Failure</h2>
There was a problem with sending your request by email. Please
call
in your request to the Help Desk.</p>
<% echo_user_input; # not included in this post, but it works
%>
<% }
%>
<% # snipped a bunch of no problem stuff %>
<%
#*************************************************************
open(MAIL, "|windmail -t") || mail_failure;
print MAIL "To: recipient\@conxus.com\n";
print MAIL "From: sender\@conxus.com\n";
print MAIL "Subject: Subject Line\n\n"; # extra \n after header
print MAIL "text text text text text text text text text \n";
print MAIL "text text text text text text text text text \n";
print MAIL "text text text text text text text text text \n";
print MAIL "text text text text text text text text text \n";
print MAIL ".\n";
close(MAIL);
%>
</body>
</html>
-------------------------
Sorry 'bout the nospam in the From field. You know how those 'bots are.
------------------------------
Date: 18 Feb 1998 01:48:37 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Q: scalar @{[/$f/g]}
Message-Id: <6cdell$lqn$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> writes:
:Although I've mentioned it before, I've yet to hear whether
:this (apparently undocumented) behaviour is intentional or
:merely an accident of other changes in 5.004.
It inferrible, a fallout of how things happen. But I think
it should have always worked. Has its workingness altered?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
sum to check equivalent files should use sum -a. --Andrew Hume
------------------------------
Date: Tue, 17 Feb 1998 20:49:38 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Seven Levels of Perl Mastery (humor)
Message-Id: <34EA3E32.44A9C7AB@fccj.cc.fl.us>
Is it possible to exist in parts of each
of these levels simultaneously?
Just wondering,
Sneex :-)
Tom Christiansen wrote:
> Seven Levels of Perl Mastery
>
> Novice
> Initiate
> User
> Expert
> Hacker
> Guru
> Wizard
------------------------------
Date: Tue, 17 Feb 1998 20:52:40 -0800
From: Steve Palincsar <palincss@nicom.com>
Subject: Re: Sort help please!
Message-Id: <34EA6918.F5D@nicom.com>
Joseph Hall is strangely reluctant to admit this, but
Sort::Fields installs perfectly well without using "make",
and runs just fine under Windows 3.1 using the djgpp port.
Simply create a directory somewhere in the @INC path
called Sort and copy Fields.pm into it.
And it really is as simple to use as he shows in his example.
I tried it this morning; took longer to download it from CPAN
than it did to get it set up and working.
Steve Palincsar
Joseph N. Hall wrote:
>
> If you use my new Sort::Fields module, you don't have to worry
> about what a Schwartzian Transform (that map sort map thing)
> is, or how it works.
>
> -joseph
>
> use Sort::Fields;
> print fieldsort q/"/, [2], <DATA>;
>
> __END__
> 1"Hugo"Brown"12 Apple St.
> 5"Barnie"Lewis"765 Boulder St.
> 7"Mickey"Mantle"123 Red Rd.
> 9"Suzy"Burger"89 Appleton St.
> 10"Fred"Winston"910 Jump St.
> 11"Norman"Rockwell"102 Poplar Dr.
> 12"Doris "Lewis"199 Greenfield St.
> 13"Dee"Brown"88 Nashua St.
------------------------------
Date: Sat, 21 Feb 1998 02:17:18 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Peter.J.Scott@jpl.nasa.gov
Subject: Re: Turning off -w for single third-party module ($^W...?)
Message-Id: <34EE7F80.1F434C7B@coos.dartmouth.edu>
[posted and mailed]
Peter Scott wrote:
>
> I bet this has something to do with $^W, but my best guess:
>
> {
> local $^W = 0;
> use File::Find;
> }
>
> doesn't make any difference. I'm probably missing fundamental about
> run-time vs compile-time here, although I continue to read that section
> of the Panther book. Any ideas?
Yes, do that, only around the function call which causes the warning to be
output, not when you load the module.
You'll need to figure out which call that is, of course. The debugger might
help - step through the code in your script until you get the warning, and
then you'll know where to turn warnings off. :-)
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: 18 Feb 1998 01:43:54 GMT
From: "Philip Kapusta" <shareware@erols.com>
Subject: Re: Using Perl to encrypt credit card numbers at Web sites
Message-Id: <01bd3c0e$56ce20c0$9e6eaccf@pentium-233mmx>
>>Eather use real encrytpion or send it in the clear this type of rot-13ish
>>encoding produces no strenth at all.
David,
Your comment assumes that I know how to use "real encryption" or "PGP"
..neither of which I do.
I've been posting messages in newsgroups, downloading scripts (which don't
work), and visiting FAQs on the Web, but nowhere can a novice (a.k.a. "me")
find a "PGP for Dumbies" section.
It's obvious that my method needs improvement, but since I have only been
working with Perl for a very short while, telling me to "use PGP" or "real
encryption" doesn't really help.
Thanks for trying to assist, however.
Philip
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 1946
**************************************