[18205] in Perl-Users-Digest
Perl-Users Digest, Issue: 373 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 28 06:05:34 2001
Date: Wed, 28 Feb 2001 03:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983358311-v10-i373@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 28 Feb 2001 Volume: 10 Number: 373
Today's topics:
Re: Aliasing refs while using strict nobull@mail.com
alt.internet.p2p (peer-to-peer) newsgroup created (Jonathan Grobe)
Automatically Submitting a Form <philip.shean@uwe.ac.uk>
Re: Automatically Submitting a Form <iltzu@sci.invalid>
Bug report: splice/stringification (Martien Verbruggen)
Re: Bug report: splice/stringification (Abigail)
Re: Bug report: splice/stringification (Gwyn Judd)
Re: Bug report: splice/stringification (Gwyn Judd)
Re: Bug report: splice/stringification (Martien Verbruggen)
Re: CGI not working with Personal Web Server <ja@nee.snee>
Re: Date formatting (Mihai N.)
Re: dereferencing an array of references using join (Anno Siegel)
Glob & long directory names <a.mcintosh@lilly.nospam.com>
Re: HELP needed on a simple Parse::RecDescent program ( <ekliao@pacbell.net>
Re: How are SOL_SOCKET and SO_REUSEADDR defined in vari (Anno Siegel)
Re: How the CLPM turns <nospam.newton@gmx.li>
Re: How the CLPM turns <nospam.newton@gmx.li>
Re: How the CLPM turns (Martien Verbruggen)
Re: How the CLPM turns (Gwyn Judd)
Is there A Perl "wrapper" for windows/Apache?? <ja@nee.snee>
Need source code for perl5.003 <user@domain.com>
Re: Newbie - HTML Mail <c_clarkson@hotmail.com>
Re: OT unwanted exclamation marks (Bernard El-Hagin)
Re: Perl CGI.pm RESET problem <joeykid6@yahoo.com>
Perl string <rbanerje@utdallas.edu>
Re: Perl string <peter.s@tjgroup.dk>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 28 Feb 2001 08:48:56 +0000
From: nobull@mail.com
Subject: Re: Aliasing refs while using strict
Message-Id: <u9ae77p0p4.fsf@wcl-l.bham.ac.uk>
Micah Cowan <micah@cowanbox.com> writes:
> I love to use this sort of construct:
>
> sub bar (\@);
>
> my @foo = ( "Hello", "cheez", 10 );
> &bar (@foo);
Really? You love to declare subroutines with prototypes then call
them using a call syntax that causes the prototype to be ignored?
I can only assume you love to confuse people.
> sub bar (\@) {
> local *foo = shift;
> print @foo; # or whatever...
> }
>
> To alias a reference to a variable.
>
> The problem is, I also love to use strict. I can't use the above
> construct unless I disable strict vars /AND/ refs, because we're
> screwing with the namespace (which is only globals and local()ized
> globals).
No need to remove strictures just insert the missing declaration.
sub bar (\@) {
our @foo; # or use vars in pre 5.6
local *foo = shift;
print @foo; # or whatever...
}
Of course you can avoid the use of global varialbles using explicit
references throughout the subroutine:
sub bar (\@) {
my $foo = shift;
print @$foo; # or whatever...
}
I believe in Perl6 you'll be able to get the best of both worlds with
something like:
sub bar (\@) {
my \@foo = shift;
print @foo; # or whatever...
}
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 28 Feb 2001 08:08:07 GMT
From: grobe+news@netins.net (Jonathan Grobe)
Subject: alt.internet.p2p (peer-to-peer) newsgroup created
Message-Id: <slrn99pcf7.fve.grobe+news@worf.netins.net>
alt.internet.p2p has just been created for discussion of p2p
(peer-to-peer) applications on the internet.
Quoting Clay Shirky:
"P2P is a class of applications that takes advantage of resources --
storage, cycles, content, human presence -- available at the edges of
the Internet. Because accessing these decentralized resources means
operating in an environment of unstable connectivity and unpredictable
IP addresses, P2P nodes must operate outside the DNS system and have
significant or total autonomy from central servers.
...
If you're looking for a litmus test for P2P, this is it: 1) Does it
treat variable connectivity and temporary network addresses as the
norm, and 2) does it give the nodes at the edges of the network
significant autonomy? If the answer to both of those questions is yes,
the application is P2P. If the answer to either question is no, it's not
P2P."
These applications include file sharing such as Napster and Gnutella,
instant messaging such as ICQ, distributed computing such as SETI@home.
Many news administrators only add new alt.* groups on user request. So if
it is not available at your site ask your news administrator to add it:
Write to him at the address news or usenet at your site or to the
technical support people there (address: support)). Because of the
poor propagation of new alt groups it will be a while before a
significant amount of traffic shows up.
--
Jonathan Grobe
------------------------------
Date: Wed, 28 Feb 2001 09:14:28 GMT
From: "Phil Shean" <philip.shean@uwe.ac.uk>
Subject: Automatically Submitting a Form
Message-Id: <G9Gn04.An4@bath.ac.uk>
Hi All,
I would like to automatically submit a HTML form which is generated by perl.
Does anyone have any ideas?
Cheers
Phil.
------------------------------
Date: 28 Feb 2001 10:19:10 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Automatically Submitting a Form
Message-Id: <983353594.27132@itz.pp.sci.fi>
In article <G9Gn04.An4@bath.ac.uk>, Phil Shean wrote:
>
>I would like to automatically submit a HTML form which is generated by perl.
>
>Does anyone have any ideas?
Sure! What kind of ideas do you want? The kind about how good a pint
of ale would taste right now? The kind about how applets and linear
algebra could advance democracy? The kind about a really pretty dark
haired girl in a swimsuit? The kind about _Losers_ being an exception
to the general writing style of David Eddings? About using strings(1)
to read MS Word documents? About constructing a 2.5m tall windmill out
of glue and cardboard? About counting to 1024 on your fingers using a
binary Gray code? About going to sleep? About hitchhiking naked in a
snowbank at -10 degrees Celsius? About the usefulness of oregano?
About the possibility that Terry Pratchett may have encountered stale
Finnish rye bread? About *really* going to sleep?
Oh. Your mean about your problem. Well, it's vague. And you're not
going to get any help unless you explain what you mean. And you're
still probably not going to get help here, unless you've got your words
mixed up and are in fact trying to use Perl for submitting the form, not
for generating it. In which case the answer is to use LWP.
Followups set to comp.infosystems.www.authoring.cgi.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"I'm just saying that I don't think it's any more or less appropriate to
condemn prostitution than it is to condemn, say, Andersen Consulting.
Tempting though that may be." -- Matt McLeod in the monastery
Please ignore Godzilla / Kira -- do not feed the troll.
------------------------------
Date: Wed, 28 Feb 2001 19:13:59 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Bug report: splice/stringification
Message-Id: <slrn99pcq7.8ue.mgjv@martien.heliotrope.home>
To the p5p and anyone connected with perl.com:
I have now tried to submit this bug report from three independent email
addresses to perlbug@perl.com, only to be told in a bounce message that
I am sending email from a 'spam haven'. I can't even email
postmaster@perl.com to complain about this puerile message, because it
bounces with the same message. An email sent from some web account to
the postmaster there has not had a response in two days, so I am giving
up.
To the p5p: You better tell those idiots at perl.com to shape up. None
of the addresses of the MTA hosts I posted through is listed in the DUL,
MAPS or ORBS. Whatever stuff they're running there is too fascist, and
ridiculously infantile, and obviously not even kept up to date. I'm
posting the bug report here in the hope that one of you picks it up and
files it. If not, so be it.
I frankly have wasted more than enough time on getting a simple bug
report in. I just wonder how many other people out there are having the
same problems I am having.
And yes, my sendmail is configured correctly. And yes, I am pissed off
about this.
This is a bug report for perl from mgjv@martien.heliotrope.home,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
This problem came to my notice after a discussion on clp.misc about some
problems being reported by Joe Pepin. It was decided that I would file
the bug report, instead of him.
It seems that the return list from splice is influenced by whether or
not the source array's elements have been stringified before the call to
splice. This is even true if the original elements were already strings.
The following program and its output may illustrate what I mean:
#!/usr/local/bin/perl -wl
use strict;
{
my @a = (1, 2, 3, 4, 5, 6, 7, 8);
my @foo = @a;
print join ":", map {$_ || "undef"} splice @a, 0, 4, @a[2,3];
}
{
my @a = (1, 2, 3, 4, 5, 6, 7, 8);
my $foo = $_ for @a;
print join ":", map {$_ || "undef"} splice @a, 0, 4, @a[2,3];
}
{
my @a = (1, 2, 3, 4, 5, 6, 7, 8);
my $foo = "@a";
print join ":", map {$_ || "undef"} splice @a, 0, 4, @a[2,3];
}
{
my @a = (1, 2, 3, 4, 5, 6, 7, 8);
my $foo = "$_" for @a;
print join ":", map {$_ || "undef"} splice @a, 0, 4, @a[2,3];
}
{
my @a = qw(a b c d e f g);
my $foo = "$_" for @a;
print join ":", map {$_ || "undef"} splice @a, 0, 4, @a[2,3];
}
__END__
OUTPUT:
1:2:3:4
1:2:3:4
1:2:undef:undef
1:2:undef:undef
a:b:undef:undef
Changing the order of the blocks makes no difference.
It seems hardly logical to me that the result of these operations should
differ, based on whether the elements of @a had been stringified before
or not, especially if they were already strings.
Martien
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.6.0:
Configured by mgjv at Sat Mar 25 17:48:49 EST 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.12-20, archname=i686-linux
uname='linux martien 2.2.12-20 #1 mon sep 27 10:40:35 edt 1999 i686
unknown '
config_args='-des -Dprefix=/opt/perl'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.6.0:
/opt/perl/lib/5.6.0/i686-linux
/opt/perl/lib/5.6.0
/opt/perl/lib/site_perl/5.6.0/i686-linux
/opt/perl/lib/site_perl/5.6.0
/opt/perl/lib/site_perl/5.005/i686-linux
/opt/perl/lib/site_perl/5.005
/opt/perl/lib/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/mgjv
LANG=en_US
LANGUAGE (unset)
LD_LIBRARY_PATH=/opt/3delight-0.6.0/Linux-i686/lib:/opt/pgplot:/opt/post
gresql/lib:/opt/gimp/lib
LOGDIR (unset)
PATH=/home/mgjv/bin:/opt/3delight-0.6.0/Linux-i686/bin:/opt/teTeX/bin:/u
sr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/openwin/bin:/
usr/openwin/demo:/opt/samba/bin:/usr/local/ssl/bin:/opt/perl/bin:/opt/ImageM
agick/bin:/opt/java/bin:/opt/mysql/bin:/opt/postgresql/bin:/opt/gimp/bin:/op
t/BMRT/bin:/opt/3delight/Linux-i686/bin:/opt/wordnet/bin
PERL_BADLANG (unset)
SHELL=/bin/tcsh
--
Martien Verbruggen |
Interactive Media Division | The gene pool could use a little
Commercial Dynamics Pty. Ltd. | chlorine.
NSW, Australia |
Martien
--
Martien Verbruggen | The problem with sharks is that they
Interactive Media Division | are too large to get to the shallow
Commercial Dynamics Pty. Ltd. | end of the gene pool. -- Scott R.
NSW, Australia | Godin
------------------------------
Date: 28 Feb 2001 10:09:40 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Bug report: splice/stringification
Message-Id: <slrn99pjj4.9a7.abigail@tsathoggua.rlyeh.net>
Martien Verbruggen (mgjv@tradingpost.com.au) wrote on MMDCCXXXVIII
September MCMXCIII in <URL:news:slrn99pcq7.8ue.mgjv@martien.heliotrope.home>:
;; To the p5p and anyone connected with perl.com:
;;
;; I have now tried to submit this bug report from three independent email
;; addresses to perlbug@perl.com, only to be told in a bounce message that
;; I am sending email from a 'spam haven'. I can't even email
;; postmaster@perl.com to complain about this puerile message, because it
;; bounces with the same message. An email sent from some web account to
;; the postmaster there has not had a response in two days, so I am giving
;; up.
This problem has been fixed in 5.6.1. Use the email address perlbug@perl.org.
Abigail
--
my $qr = qr/^.+?(;).+?\1|;Just another Perl Hacker;|;.+$/;
$qr =~ s/$qr//g;
print $qr, "\n";
------------------------------
Date: Wed, 28 Feb 2001 10:13:46 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Bug report: splice/stringification
Message-Id: <slrn99pjqo.mq9.tjla@thislove.dyndns.org>
I was shocked! How could Martien Verbruggen <mgjv@tradingpost.com.au>
say such a terrible thing:
>To the p5p and anyone connected with perl.com:
Just FYI. I forwarded your message in it's entirety to the perlbug
address.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Putt's Law:
Technology is dominated by two types of people:
Those who understand what they do not manage.
Those who manage what they do not understand.
------------------------------
Date: Wed, 28 Feb 2001 10:19:26 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Bug report: splice/stringification
Message-Id: <slrn99pk5c.mq9.tjla@thislove.dyndns.org>
I was shocked! How could Gwyn Judd <tjla@guvfybir.qlaqaf.bet>
say such a terrible thing:
>I was shocked! How could Martien Verbruggen <mgjv@tradingpost.com.au>
>say such a terrible thing:
>>To the p5p and anyone connected with perl.com:
>
>Just FYI. I forwarded your message in it's entirety to the perlbug
>address.
Ya filthy spammer ;)
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
There was an old man of Hong Kong
Who never did anything wrong.
He would lie on his back
With his head in a sack
And secretly finger his dong.
------------------------------
Date: Wed, 28 Feb 2001 21:39:20 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Bug report: splice/stringification
Message-Id: <slrn99plao.8ue.mgjv@martien.heliotrope.home>
On 28 Feb 2001 10:09:40 GMT,
Abigail <abigail@foad.org> wrote:
> Martien Verbruggen (mgjv@tradingpost.com.au) wrote on MMDCCXXXVIII
> September MCMXCIII in <URL:news:slrn99pcq7.8ue.mgjv@martien.heliotrope.home>:
> ;;
> ;; I have now tried to submit this bug report from three independent email
> ;; addresses to perlbug@perl.com, only to be told in a bounce message that
> ;; I am sending email from a 'spam haven'.
>
> This problem has been fixed in 5.6.1. Use the email address perlbug@perl.org.
Thanks,
Martien
--
Martien Verbruggen |
Interactive Media Division | We are born naked, wet and hungry.
Commercial Dynamics Pty. Ltd. | Then things get worse.
NSW, Australia |
------------------------------
Date: Wed, 28 Feb 2001 08:13:08 -0800
From: "Me" <ja@nee.snee>
Subject: Re: CGI not working with Personal Web Server
Message-Id: <fW8wKTVoAHA.200@asd24-aux-005.raketnet.nl>
This is normal. You probably setup perl to open .cgi or .pl files by
default.
There's nothing wrong with that either.
The only thing you need done is setup PWS to use it.
Now I am on Apache myself (also free. Might wanna give it a try since it's
much easier to configure and far more powerful) and there you can set a
"cgi-directory" where ALL the files in there will get processed by the
program you point out you want it done with.
Good luck with it. You're half way, I'm sure. But can't help you on solving
this completely. Hope I helped you anyway.
Regards,
Michel
WebMaster@NetStyle.NL
"Mark" <mark_shutt@hotmail.com> wrote in message
news:t9ohkg99qaljd5@corp.supernews.com...
> Hi,
>
> I'm using Perl and MS PWS. When I submit a form to display a simple
> message, the Perl script executes by quickly pulling up a DOS prompt and
> the page just sits there. I have the registry correct with the ScriptMap I
> think. I've seen numerous examples that all say the same thing. Does
> anyone know why my perl scripts would execte as if I ran them from the DOS
> prompt or as if I double clicked the script from windows explorer? I have
> also since removed the "Open" action of Windows explorer because I thought
> that may have been affecting it, but that doesn't seem to be the case.
>
> Thanks,
> Mark
>
> --
> Posted via CNET Help.com
> http://www.help.com/
------------------------------
Date: Wed, 28 Feb 2001 08:01:58 GMT
From: nmihai_2000@yahoo.com (Mihai N.)
Subject: Re: Date formatting
Message-Id: <9056A717MihaiN@24.1.64.32>
The module is more than usefull!
With your approach, what is happening if it is used for a web site?
And if the web site must support languages other than English?
Are you going to create a new function for each language?
The main trick is to load the date format string from a "language file".
How does a Norwegian date looks like?
Mihai
>There are modules that can do this, although a module is hardly
>necessary:
>
>sub my_date_convert {
> my @mon = qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC);
> my @date = split '/', shift;
> sprintf '%02d-%s-%02d', $date[1], $mon[$date[0]-1], $date[2] % 100;
>}
>
>Peter
>
------------------------------
Date: 28 Feb 2001 10:33:41 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: dereferencing an array of references using join
Message-Id: <97ik65$1d7$1@mamenchi.zrz.TU-Berlin.DE>
According to Joe Williams <joeykid6@yahoo.com>:
> Thanks, Ren. For some reason, I thought I tested without the quotes and got
> an error. You win for the most concise code and the least impatient
> response....
Do you realise how arrogant that sounds?
Anno
------------------------------
Date: Wed, 28 Feb 2001 10:08:43 -0000
From: "Mac" <a.mcintosh@lilly.nospam.com>
Subject: Glob & long directory names
Message-Id: <er4n6.1$Z3.128@iq-lilly1>
I'm kinda new to Perl & am having a problem getting glob to list long
directory names
perl version :- ActivePerl 5.6.0.623 for Win32 running on Win2K
I have a
'use file::glob'
declaration and when using
@files = glob("*.*")
I get an array of all the file names - no name length limit - but I only get
folder names that are 8.3 or less in length.
If I glob("/123456789/*.*") I get the contents of *that* folder - excepting
any folders with long names ...
Is there another module I could use ?
Any other way to get a complete list ?
Any help appreciated
Mac
------------------------------
Date: 28 Feb 2001 02:15:11 -0600
From: Eric Liao <ekliao@pacbell.net>
Subject: Re: HELP needed on a simple Parse::RecDescent program (problem: some rules are matched twice)
Message-Id: <3icp9ts98j4joff1k4k3plbt1fpk5ed067@4ax.com>
You're right. The <leftop> and <rightop> directives do make life
easier! Glad you mentioned it.
On Tue, 27 Feb 2001 09:32:29 -0800, Terrence Monroe Brannon
<terrence.brannon@oracle.com> wrote:
>I think Parse::RecDescent has a LEFTOP directive to facilitate this parsing
>idiom.
>
>Gwyn Judd wrote:
>
>> I was shocked! How could Randal L. Schwartz <merlyn@stonehenge.com>
>> say such a terrible thing:
>> >>>>>> "Eric" == Eric Liao <ekliao@hotmail.com> writes:
>> >
>> >Eric> I am a new user of Parse::RecDescent. I tried to use v1.80 to
>> >Eric> implement a simple parser with a simple grammar for parsing c/c++/java
>> >Eric> code. The result looks good except that 5 rules seem to be matched
>> >Eric> twice (see output and expected output below). I could not figure out
>> >Eric> why. Any help would be greatly appreciated. Please e-mail
>> >Eric> ekliao@hotmail.com or post to the groups. Thank you.
>> >
>> >You can't print out your result while you are parsing it, because you
>> >can't "unprint" a backtrack. You backtracked in "expression" from the
>> >first subrule to the second subrule, but you'd already printed out the
>> >result of a successful first step of that first subrule.
>> >
>> >Don't do that. Pass the data upstairs, and have the final top-level
>> >rule do all the work.
>>
>> Alternatively, you could make the grammar LL(1) so there is no need for
>> backtracking. There is only the one problematic non-terminal so it
>> shouldn't be too hard. Simply replace this:
>>
>> expression : unary_expr PLUS_OP expression
>> | unary_expr
>>
>> with this:
>>
>> expression : unary_expr plus_expression
>>
>> plus_expression : PLUS_OP expression
>> | # nothing
>>
>> --
>> Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
>> Fortune's real live weird band names #13:
>>
>> Alien Sex Fiend
------------------------------
Date: 28 Feb 2001 10:59:37 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How are SOL_SOCKET and SO_REUSEADDR defined in various flavors of Unix?
Message-Id: <97ilmp$1d7$2@mamenchi.zrz.TU-Berlin.DE>
According to Kenny McCormack <gazelle@interaccess.com>:
> In article <97h57q$2926$1@xlerb.dynas.se>,
[...]
> >Apart from this being a bad idea from a mainatanence perspective,
> >Solaris, AIX, HP-SUX, FreeBSD and even M$ winsock use the same
> >definitions - most likely inheritance from the BSD TCP/IP stack.
>
> Interesting. At last, a useful reply.
The perceived scarceness of useful replies has to do with the fact
that you asked a Unix question on a Perl newsgroup.
Anno
------------------------------
Date: Wed, 28 Feb 2001 07:22:05 +0100
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
Subject: Re: How the CLPM turns
Message-Id: <n26p9tkgco8irpgt5haf1c03hnapqsns82@4ax.com>
On Tue, 27 Feb 2001 09:02:45 -0500, tadmc@augustmail.com (Tad McClellan) wrote:
> Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote:
> >
> >I'm new to PERL. I want to sort an array, but don't know how. I've spent
> >hours searching the Web, the docs, the FAQs, the books, and under my
> ^^^^^^^^^ ^^^^^^^^
> >bed, but couldn't find the answer.
>
>
> A rather non-typical newbie there.
I think I've seen a fair number who've claimed to have done so. Especially the
web -- maybe not so many who claim to have searched the docs.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 28 Feb 2001 07:22:05 +0100
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
Subject: Re: How the CLPM turns
Message-Id: <f76p9tctecavtqouselg09mc65kfqqvm78@4ax.com>
On Wed, 28 Feb 2001 11:38:39 +1300, "Peter Sundstrom"
<peter.sundstrom-eds@eds.com> wrote:
> I'm too lazy to search Usenet archives, use a search engine, read a book or
> even search the Perl documentation on my hard disk, so I'm demanding that
> someone give me an instant answer
...because my homework is due tomorrow.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 28 Feb 2001 19:16:14 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: How the CLPM turns
Message-Id: <slrn99pcue.8ue.mgjv@martien.heliotrope.home>
On Tue, 27 Feb 2001 07:49:59 +0000 (UTC),
Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote:
>
> DISCLAIMER!
> My goal in doing this is not to offend anyone. Quite the contrary,
> actually.
Excellent. Worth saving :)
Martien
--
Martien Verbruggen |
Interactive Media Division | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd. | you come to the end; then stop.
NSW, Australia |
------------------------------
Date: Wed, 28 Feb 2001 10:12:07 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: How the CLPM turns
Message-Id: <slrn99pjng.mq9.tjla@thislove.dyndns.org>
I was shocked! How could Philip 'Yes, that's my address' Newton <nospam.newton@gmx.li>
say such a terrible thing:
>On Wed, 28 Feb 2001 11:38:39 +1300, "Peter Sundstrom"
><peter.sundstrom-eds@eds.com> wrote:
>
>> I'm too lazy to search Usenet archives, use a search engine, read a book or
>> even search the Perl documentation on my hard disk, so I'm demanding that
>> someone give me an instant answer
>
>...because my homework is due tomorrow.
and don't tell me to read anything because I can't read.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Don't marry for money, you can borrow it cheaper.
-- Scottish Proverb
------------------------------
Date: Wed, 28 Feb 2001 08:23:30 -0800
From: "Me" <ja@nee.snee>
Subject: Is there A Perl "wrapper" for windows/Apache??
Message-Id: <QP9B9YVoAHA.379@asd24-aux-005.raketnet.nl>
Hi Folks,
Could anyone point me in the right direction for a perl-wrapper for Apache
for win32?
I found a nice wrapper, called "PerlEx". What it does is let perl.exe be
resident in memory, thereby creating an enormous perl-execution-speed (they
talk about 50x speed improvement) because windows doesn't need to fire-up
perl anymore.....
That's the theory.....
Anyaone has/knows something similar?
Thank you!!
Michel
WebMaster@NetStyle.NL
------------------------------
Date: 28 Feb 2001 12:41:54 +0530
From: Kolla <user@domain.com>
Subject: Need source code for perl5.003
Message-Id: <rbwbsrnz3gl.fsf@domain.com>
Hi,
Can somebody help me in finding out the source distribution for
perl5.003??. If you can, please post URL from which i can download
above mentioned distribution.
-TIA
-Kolla
--
Kolla Suresh Babu
<k_o_l_l_a@yahoo dot co dot in>
The chief cause of problems is solutions.
-- Eric Sevareid
------------------------------
Date: Tue, 27 Feb 2001 23:27:58 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: Newbie - HTML Mail
Message-Id: <CDCB8DD439FBDDBC.B721FFECE20DA91D.F2D95FC83167DE8D@lp.airnews.net>
"Sharon Weis" <stiroff@elsitech.com> wrote
: Hi, I am new to Perl CGI and I am trying to send mail in HTML
: format. I am using ActivePerl and installed the MIME::Lite
: package. I am able to send mail successfully. However, it is
: printing the following errors on my CGI form. I have never
: modified, let alone opened the Config.pm or the Domain.pm.
: I've noticed that 3 out of 4 errors have to do with the domain.
: Am I suppose to modify these files and if so what am I
: suppose to modify?
[SNIP]
While it is possible, it is unlikely the error is in the modules.
Why don't you show us the code you are using?
HTH,
Charles K. Clarkson
------------------------------
Date: Wed, 28 Feb 2001 06:43:19 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: OT unwanted exclamation marks
Message-Id: <slrn99p7fk.n9t.bernard.el-hagin@gdndev32.lido-tech>
On Tue, 27 Feb 2001 09:29:12 -0500, Tad McClellan <tadmc@augustmail.com>
wrote:
>Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote:
>>On Tue, 27 Feb 2001 12:52:45 -0000, Terry <dcs@ntlworld.com> wrote:
>>>Hi
>>>
>>>I don't think this is actually a perl\cgi problem but hopefully somebody has
>>>come across this before and can help:-)
>>
>>Well I've got a nasty itch on my back *just* where I can't reach it. I'm
>>hoping that maybe someone has had a similar experience and could help
>>me.
>
>
>Since you must read all of Perl's standard documentation to post
>here anyway, you should print it all out for easy reference.
>
>Then stack it up until it reaches the height of the affected back
>area, turn around, and rub your back against the stack.
>
>If you are tall, you may need to download some or all of the
>modules from CPAN so you will have even more valuable
>documentation to print, useful for solving all of life's
>problems one way or another.
I see I still have a lot to learn about Perl. :-)
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: Wed, 28 Feb 2001 00:54:26 -0500
From: "Joe Williams" <joeykid6@yahoo.com>
Subject: Re: Perl CGI.pm RESET problem
Message-Id: <97i3va$lei$1@slb2.atl.mindspring.net>
You might try the defaults() function, instead of reset(). defaults() in
CGI.pm creates a Reset button which empties the parameter list entirely.
You could also make use of the -override=> attribute, which allows you, as
the name suggests, to override element values.
Joe
What A Man ! <whataman@home.com> wrote in message
news:3A9C4FF5.55DEE58A@home.com...
> How do I get my RESET button in the script below to clear
> the HTTP REFERRER out of the input field when someone hits
> RESET? I don't want to use Javascript or have to create
> another file to do this. I've been studying CGI.pm all day
> and can't figure it out. Is there a way to do this with
> raw Perl if CGI.pm won't do it?
>
> #!/usr/local/bin/perl -wd
> use CGI qw(fatalsToBrowser);
> use CGI qw(:standard);
>
> print "Content-type: text/html\n\n";
>
> print "<HTML><BODY bgcolor=99CCFF topmargin=0>
> <CENTER><!--#echo banner=''-->";
>
> $query = new CGI;
>
> print $query->start_form(-method=>$method,
> -action=>$action,
> -enctype=>$encoding);
>
> print $query->textfield(-name=>'url',
> -default=>"$ENV{HTTP_REFERER}",
> -size=>60,
> -maxlength=>300);
> print "<BR>";
>
> print $query->reset(-name=>'RESET',
> -value=>'param()');
> print " ";
> print $query->submit(-name=>'submit',
> -value=>'SUBMIT');
> print "</CENTER></BODY></HTML>";
> print $query->endform;
>
>
> Thanks,
> Dennis
------------------------------
Date: Tue, 27 Feb 2001 23:35:19 -0600
From: Raja Banerjee <rbanerje@utdallas.edu>
Subject: Perl string
Message-Id: <3A9C8E17.909E555A@utdallas.edu>
Hi
I am trying to run a system command like
mailx name@host.com -r "login2@host.com" < filename
from a perl program .
Theproblem is with the inverted commas .I have not been able to figure
out how to invoke it so that it works.
Any help appreciated
Raja
------------------------------
Date: Wed, 28 Feb 2001 11:51:34 +0100
From: "Peter Søgaard" <peter.s@tjgroup.dk>
Subject: Re: Perl string
Message-Id: <97il0v$i49$1@news.inet.tele.dk>
1.. NAME
2.. SYNOPSIS
3.. DESCRIPTION
1. NAME
system - run a separate program
----------------------------------------------------------------------------
----
2. SYNOPSIS
system LIST
----------------------------------------------------------------------------
----
3. DESCRIPTION
Does exactly the same thing as ``exec LIST'' except that a fork is done
first, and the parent process waits for the child process to complete. Note
that argument processing varies depending on the number of arguments. The
return value is the exit status of the program as returned by the wait call.
To get the actual exit value divide by 256. See also exec.html">exec. This
is NOT what you want to use to capture the output from a command, for that
you should use merely back-ticks or qx//, as described in `STRING`.
Because system and back-ticks block SIGINT and SIGQUIT, killing the program
they're running doesn't actually interrupt your program.
@args = ("command", "arg1", "arg2");
system(@args) == 0
or die "system @args failed: $?"
Here's a more elaborate example of analysing the return value from system on
a UNIX system to check for all possibilities, including for signals and
coredumps.
$rc = 0xffff & system @args;
printf "system(%s) returned %#04x: ", "@args", $rc;
if ($rc == 0) {
print "ran with normal exit\n";
}
elsif ($rc == 0xff00) {
print "command failed: $!\n";
}
elsif ($rc > 0x80) {
$rc >>= 8;
print "ran with non-zero exit status $rc\n";
}
else {
print "ran with ";
if ($rc & 0x80) {
$rc &= ~0x80;
print "coredump from ";
}
print "signal $rc\n"
}
$ok = ($rc != 0);
"Raja Banerjee" <rbanerje@utdallas.edu> skrev i en meddelelse
news:3A9C8E17.909E555A@utdallas.edu...
> Hi
> I am trying to run a system command like
> mailx name@host.com -r "login2@host.com" < filename
> from a perl program .
> Theproblem is with the inverted commas .I have not been able to figure
> out how to invoke it so that it works.
> Any help appreciated
> Raja
------------------------------
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 V10 Issue 373
**************************************