[13995] in Perl-Users-Digest
Perl-Users Digest, Issue: 1405 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 17 09:08:41 1999
Date: Wed, 17 Nov 1999 06:05:13 -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: <942847513-v9-i1405@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 17 Nov 1999 Volume: 9 Number: 1405
Today's topics:
"if" statement not working correctly <Stuart.Pedler@sbs.siemens.co.uk>
Re: about line sort ? <wyzelli@yahoo.com>
Re: access Oracle on NT from Linux/Perl: is that possib <310064202272#0001@online.de>
Call for Programs: the "phonecode" benchmark (Lutz Prechelt)
Re: CHMOD for Net::FTP. Help, cool hackers ! <microwizard@my-deja.com>
Create Connection on Port 80 and send a command ken@atlas.net.tw
Re: Create Connection on Port 80 and send a command <gellyfish@gellyfish.com>
Embeding perl in C++ shared library <sree@india.ti.com>
Re: Fetch Dilbert. (Bart Lateur)
Re: File::Find on Win32 :-( - getit4.pl (0/1) (Lars Gregersen)
Re: File::Find on Win32 :-( - getit4.pl (0/1) <gellyfish@gellyfish.com>
Flat File Searching Problem <martin@mert.globalnet.co.uk>
Re: Flat File Searching Problem <martin@mert.globalnet.co.uk>
Re: Help With CyberCash.... (Mr. X)
How do I get a list of users in an NT domain? <tim.westlakeNOtiSPAM@myremarq.com.invalid>
How do I reference the NT registry with Perl 4 ? (Jennell Little)
how to prevent people going around my login.cgi and typ cm95@hotmail.com
Re: how to prevent people going around my login.cgi and <s.fabel@buero.link-m.de>
Re: how to prevent people going around my login.cgi and <gellyfish@gellyfish.com>
Re: how to prevent people going around my login.cgi and <flavell@mail.cern.ch>
Re: IE and Frames <flavell@mail.cern.ch>
IS THIS THE RIGHT GROUP TO POST PERL INSTALLATION PROBL <ibzobang@vsnl.com>
Re: IS THIS THE RIGHT GROUP TO POST PERL INSTALLATION P <gellyfish@gellyfish.com>
Re: Longest match (Bart Lateur)
Re: Longest match (Mark-Jason Dominus)
Multiple file download <jcs@netexpansion.com>
Re: my ... if -- strange behavior (Bart Lateur)
Re: my ... if -- strange behavior <rhomberg@ife.ee.ethz.ch>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 17 Nov 1999 09:00:44 -0000
From: "Stuart Pedler" <Stuart.Pedler@sbs.siemens.co.uk>
Subject: "if" statement not working correctly
Message-Id: <80tqrt$est$1@taliesin.netcom.net.uk>
can anyone help me with a problem I am having with perl on NT.
I have found myself in at the deep end trying to create a perl script with
no previous exposure.
What I am trying to achieve is to load a directory tree into an array,
change into each of those directories and test for the presence of another
directory with a name beginning "lib_" . If this directory exists, change
back to the root and remove the directory as held in the array.
My problem is that on running the script, not all the "lib_*" are picked up
so I have to run the script several times to complete the operation.
My code is a s follows :-
require "common.pl";
$prog = "Clear_Archive";
print "\n";
#
# Log the fact that we have been run.
#
Log($prog, 1, "Begin: Program has started.");
#
# Read in the config variables
#
$pkgbase = GetConfig("PACKAGEBASE");
@packages = ();
chdir $pkgbase ;
print "Reading list of directories into an Array\n";
@packages = sort glob("$pkgbase\\ESCOM_*");
for ($index=0; $index <=$#packages; $index++)
{
chdir $packages[$index];
if (glob("LIB_*"))
{
print "The directory $packages[$index] contains a library
delta\n";
chdir $pkgbase;
print "The package $packages[$index] will now be removed\n";
use File::Path;
rmtree($packages[$index], 1, 1);
}
else
{
print " The directory $packages[$index] does not contain a
library delta\n";
}
}
Any help will be greatly appreciated
Please E-Mail replies to
Stuart.Pedler@sbs.siemens.co.uk
------------------------------
Date: Wed, 17 Nov 1999 19:26:08 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: about line sort ?
Message-Id: <XYuY3.7$pt4.751@vic.nntp.telstra.net>
Larry Rosler <lr@hpl.hp.com> wrote in message
news:MPG.129bfb4b9cd1f0d798a21a@nntp.hpl.hp.com...
> In article <BipY3.6$Pp4.3025@vic.nntp.telstra.net> on Wed, 17 Nov 1999
> 12:59:37 +0930, Wyzelli <wyzelli@yahoo.com> says...
>
>
> I didn't see any indication that the keys $ex3 were unique. If they
> aren't, you will lose data with this approach.
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
Ooop.. Good call...
Thanks Larry
Wyzelli
------------------------------
Date: Wed, 17 Nov 1999 12:50:49 +0100
From: bmlam <310064202272#0001@online.de>
Subject: Re: access Oracle on NT from Linux/Perl: is that possible?
Message-Id: <38329699.D6F66367@online.de>
Thank you Xuequn. I was hoping just some Perl modules would do it.
Xuequn Xu schrieb:
> Yes. Try perl module DBI and DBD:Oracle. You also need to install
> the oracle client library on the Linux side, and start oracle listener
I would appreciate it very much if you could point out where and how one can
obtain the client library. Thanks
>
> on the NT server.
>
> Xuequn Xu, Oracle DBA
> Caltech, Pasadena, CA
>
> bmlam (310064202272#0001@online.de) wrote:
> : We have an Oracle server running on NT platform and we are considering
> : installing Apache on a Linux box that will access the Oracle database
> : when serving web pages. The CGI script would be written in Perl. Does
> : Perl have a module that enables this kind of remote database access to
> : Oracle 8.0.4?
>
> : Thanks for any hints!
------------------------------
Date: 17 Nov 1999 13:23:09 GMT
From: prechelt@ira.uka.de (Lutz Prechelt)
Subject: Call for Programs: the "phonecode" benchmark
Message-Id: <80ua7t$mar$1@news.rz.uni-karlsruhe.de>
Hi all,
- Out of the following set of scripting languages:
Perl, Python, Rexx, Tcl
do you prefer one over the others?
- Do you think one is inherently better than the others?
- Or aren't you sure?
NOW IS THE TIME TO FIND OUT!
I have prepared an interesting small programming problem
and have collected a number of implementations for it in C, C++, Java
and Lisp.
Comparing these programs, one finds that there are substantial
differences between the different languages (such as for program length,
programming time, run time, memory requirements), but that the differences
between the individual implementations even within one language are
even larger.
I would now like to extend this investigation to scripting languages:
o Are differences between implementations using the same language
smaller or even larger than for "standard" programming languages?
o Do systematic differences between different scripting languages
exist?
o How do the scripting languages compare to standard programming
languages such as C or Java?
If you are interested in participating in this investigation
please create an implementation of the "Phonecode" benchmark
problem in your favorite scripting language and submit it to me.
I will make the results available to you after the evaluation.
The effort required is typically somewhere between 1 and 8 hours.
For a description of the programming problem etc., see
http://wwwipd.ira.uka.de/~prechelt/phonecode/
NOTE THAT THIS PROGRAM COLLECTION EFFORT CLOSES AT DECEMBER 18, 1999.
Happy programming!
Lutz
P.S.: You sure know at least ONE other person who might be interested
in this, right? Please tell him or her!
I'd also be happy to hear about mailing lists for
which this posting might be appropriate.
Lutz Prechelt http://wwwipd.ira.uka.de/~prechelt/ | Whenever you
Institut f. Programmstrukturen & Datenorganisation | complicate things,
Universitaet Karlsruhe; 76128 Karlsruhe; Germany | they get
(Phone: +49/721/608-4068, FAX: +49/721/608-7343) | less simple.
>>> Ever had negative research results? http://wwwipd.ira.uka.de/fnr <<<
------------------------------
Date: Wed, 17 Nov 1999 11:57:00 GMT
From: MetaWizard <microwizard@my-deja.com>
Subject: Re: CHMOD for Net::FTP. Help, cool hackers !
Message-Id: <80u56b$mp2$1@nnrp1.deja.com>
In article <KZgY3.18884$YI2.805389@typ11.nn.bcandid.com>,
pacman@defiant.cqc.com (Alan Curry) wrote:
> Kragen Sitaker <kragen@dnaco.net> wrote:
> >MetaWizard <microwizard@my-deja.com> wrote:
> >>Thank to everybody for your help!
> >>One more problem I found. I can't chmod by mask. I have about 8
> >>directories, suumary with about 400 files and I have to change their
> >>mode. For each directory there is a constant mode for files in this
> >>directory. How can I quickly chmod all this files ?
> >
> >"use File::Find" is one answer. "Use @ARGV and command-line
globbing"
> >is another. "use bitwise operations" is probably another. But which
> >part are you having trouble with?
>
> The part where it has to happen over FTP?
>
> I wonder what the odds are against SITE EXEC chmod -R working.
> --
> Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
> pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
> --------------+save some time): | \__/ \__/ \___: \___:
> Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" --
Cartman
>
The problem is that server VirtualAvenue doesn't match cmod -R command !
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 17 Nov 1999 09:30:20 GMT
From: ken@atlas.net.tw
Subject: Create Connection on Port 80 and send a command
Message-Id: <80tsjc$n38$1@news.seed.net.tw>
Hi :
I have sucessfully write a short script using IO::SOCKET to make a
connection on port 80 (HTTP) and
send a command "GET xxxxxxx.html ...." to get a HTML page.
Now I want to simulate a browser to fill some form columns to
initiate the corrosponding CGI program.
In HTML : <form action=...... method=post>
<input name="user">
<input name="passwd">
<input type=submit>
How could I do simulate these and make the CGI program to be run
???
Thanks a lot !!
KEN
------------------------------
Date: 17 Nov 1999 12:52:42 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Create Connection on Port 80 and send a command
Message-Id: <3832a51a_1@newsread3.dircon.co.uk>
ken@atlas.net.tw wrote:
> Hi :
>
> I have sucessfully write a short script using IO::SOCKET to make a
> connection on port 80 (HTTP) and
> send a command "GET xxxxxxx.html ...." to get a HTML page.
>
> Now I want to simulate a browser to fill some form columns to
> initiate the corrosponding CGI program.
>
> In HTML : <form action=...... method=post>
> <input name="user">
> <input name="passwd">
> <input type=submit>
>
> How could I do simulate these and make the CGI program to be run
> ???
>
Please use the module LWP::UserAgent which is part of libwww-perl
available from CPAN <http://www.cpan.org> - this has a document lwpcook
that has examples of doing this. If you want to do this without using that
module then you will need to read the relevant HTTP specificication
to determine what it is that you need to send and in what format.
/j\
--
"He is marvelous at beating men and achieving real penetration" -
Alex Ferguson
------------------------------
Date: Wed, 17 Nov 1999 15:19:06 +0530
From: Sreekanth <sree@india.ti.com>
Subject: Embeding perl in C++ shared library
Message-Id: <38327A12.8B393080@india.ti.com>
I would like to embed perl code in my C++ "*.so" modules.
Functions are accessed using "dlopen" and "dlclose" library routines.
Does anybody has any idea of how to to do this. How should i compile
and link the modules.
I have already read perlembed man page. This gives information
about how to embed in normal C++ code with "main()". But it doesn't
give any info on embedding in shared libraries. Please refer me to
any examples or documentation on this.
Thanks and best regards,
sreekanth
--
/-----------------------------------------------------------------\
| SREEKANTH K M |
| |
| sree@india.ti.com ASIC PDC,Texas Instruments India|
\-----------------------------------------------------------------/
------------------------------
Date: Wed, 17 Nov 1999 08:51:38 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Fetch Dilbert.
Message-Id: <38356c2f.3385851@news.skynet.be>
perldoc@my-deja.com wrote:
>> open DISPLAY, "| $viewer" or die "Failed to open viewer.\n";
>> print DISPLAY $image;
>> close DISPLAY or die "Failed to close viewer.\n";
>
>OK, I'll take the troll.
Otherwise, I will.
What, no "binmode"?
--
Bart.
------------------------------
Date: Wed, 17 Nov 1999 09:21:42 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: File::Find on Win32 :-( - getit4.pl (0/1)
Message-Id: <38327386.6686431@news.dtu.dk>
On Wed, 17 Nov 1999 00:15:49 GMT, jaws@mindspring.com (John Armsby)
wrote:
>I have written a short Perl script to recurse through a Novel
>(windows) directory and return path and file name. Interestingly
>enough "dir /b/s" does the same thing. The good news is that it
>works. The bad news is that long filenames are reduced to the 8.3
>format. SURELY there is a way around this. I am running the latest
>from active state on NT with all the service packs installed.
Hi
Is there any reason you can't use the module File::Find?
Lars
------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
------------------------------
Date: 17 Nov 1999 12:58:34 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: File::Find on Win32 :-( - getit4.pl (0/1)
Message-Id: <3832a67a_1@newsread3.dircon.co.uk>
John Armsby <jaws@mindspring.com> wrote:
> I have written a short Perl script to recurse through a Novel
> (windows) directory and return path and file name. Interestingly
> enough "dir /b/s" does the same thing. The good news is that it
> works. The bad news is that long filenames are reduced to the 8.3
> format. SURELY there is a way around this. I am running the latest
> from active state on NT with all the service packs installed.
>
Sorry what was your perl question ?
/j\
--
"The teenage masturbators of today are the television executives of
tomorrow" - Melissa Cabriolet, Drop the Dead Donkey
------------------------------
Date: Wed, 17 Nov 1999 13:12:29 -0000
From: "Martin Elliott" <martin@mert.globalnet.co.uk>
Subject: Flat File Searching Problem
Message-Id: <80u9qe$8o3$1@gxsn.com>
I'm having difficulty with a project I am doing for Uni, a form is filled in
and a script deals with that, no bother, but now I want another script that
searches a flat file, created by the first script and returns certain
criteria.
Can anyone help ????
The flat file db is set out like this:
name=Martin
email=mert@globalnet.co.uk
choice=item2
quantity=5
address=My_Street
name=Someone_else
email=...
...
What I want to do is to be able to display the quantity of a given item, for
all instances of that item. So a user can specify 'item2', for example, and
the script will search the db and return all of the appropriate quantities.
The problem I am having is that I can find the item name, but returning the
quantity is another matter, as the script just returns all of the quantity=x
lines that it finds. Is there a way of only accepting those quantity lines
that come after the correct choice=x line??
Thanks, and sorry if this is a poo explanation,
Martin
------------------------------
Date: Wed, 17 Nov 1999 13:27:01 -0000
From: "Martin Elliott" <martin@mert.globalnet.co.uk>
Subject: Re: Flat File Searching Problem
Message-Id: <80ualm$g6o$1@gxsn.com>
Sorry, so far I have split the db into an array of $name=$value pairs, is
there any way I can simply jump to the next $value???
Thanks,
Martin
------------------------------
Date: Wed, 17 Nov 1999 13:56:48 GMT
From: xavier10@die.spammers.hotmail.com (Mr. X)
Subject: Re: Help With CyberCash....
Message-Id: <3832b3ba.67515892@news.cois.on.ca>
Craig,
I wish I could drop it. I have lost some hair already during this
fiasco. Not happy with CyberCash. So I take it no-one can do this? The
scripting I mean, my employer is getting antsy....
Cheers,
B.
On Tue, 16 Nov 1999 15:59:56 -0500, Craig Simpson
<craigsimpson@mindspring.com> wrote:
>
>It is a piece. Do not use CyberCash. It darn near made my hair fall out.
>
>"Mr. X" wrote:
>
>> Brian,
>> Yes I have read ALL the documentation and was on the line with
>> CyberCash for days. Heck, they could not do it...I'm wondering if it
>> can be done, and if so, how. I have tried everything that CyberCash
>> has asked me to with no luck....
>>
>> Brandon.
>>
>> On Fri, 12 Nov 1999 19:40:18 -0500, brian@smithrenaud.com (brian d
>> foy) wrote:
>>
>> >In article <382c5a6f.102501068@news.cois.on.ca>, xavier10@die.spammers.hotmail.com (Mr. X) posted:
>> >
>> >> This has been dumped in my lap this morning....not happy....
>> >> The company I work for just recently setup CyberCash on their secure
>> >> servers. It works just great, it verify the credit cards and all. BUT
>> >> it does not mail the merchant a verification or indication that there
>> >> has been a CC sale. The company wants the script to email the merchant
>> >> the information that CyberCash gets back from the bank. I have talked
>> >> extensively with CyberCash about this and they indicate it is not
>> >> their policy to help with stuff like this. I have modified the script
>> >> to mail the merchant, but I cannot find out how to include the
>> >> information in the email.
>> >> I hope someone has had experience with this, as we are going nuts here
>> >> trying to figure it out!
>> >
>> >have you read the various documentation sets (including the developer
>> >set) supplied with Cybercash? it's all in there.
------------------------------
Date: Wed, 17 Nov 1999 05:02:50 -0800
From: Tim Westlake <tim.westlakeNOtiSPAM@myremarq.com.invalid>
Subject: How do I get a list of users in an NT domain?
Message-Id: <09920fb9.09c54eb6@usw-ex0101-008.remarq.com>
Hi
How can I get a list of users in an NT domain? There is a
LocalGroupGetMember function in Win32::NetAdmin but not a similar one
for global groups (in the documentation I have anyway). If there was
then I could query the Domain Users global group.
Help appreciated
thanks
Tim
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Wed, 17 Nov 1999 13:41:02 GMT
From: Jennell_Little@tivoli.com (Jennell Little)
Subject: How do I reference the NT registry with Perl 4 ?
Message-Id: <3832afc4.89107369@rtpnews.raleigh.ibm.com>
Is there a way to reference the NT registry with Perl 4?
Jennell Little
------------------------------
Date: Wed, 17 Nov 1999 12:23:35 GMT
From: cm95@hotmail.com
Subject: how to prevent people going around my login.cgi and typing the url of my site??
Message-Id: <80u6o4$nua$1@nnrp1.deja.com>
I have web page that is protected. Only registered members are let in. I
made a login.cgi that lets registered members in. Then the users is in
my protected area. The protected area is a normal www address. It is
like www.somehostname.com/~protected/ In that address I have a
couple more cgi programs that connect users to database. But the
question is how can i prevent people typing the url in the browser and
letting themselves in without my login.cgi. Is there a way to restrict??
any help would be apprectiated really
cheers
To try may be to fail, but not trying is the surest way to failure!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 13:46:49 +0100
From: Stephan Fabel - Linksystem Muenchen <s.fabel@buero.link-m.de>
Subject: Re: how to prevent people going around my login.cgi and typing the url of my site??
Message-Id: <Pine.LNX.3.95.991117134445.8521C-100000@neptun.link-m.de>
Hi,
On Wed, 17 Nov 1999 cm95@hotmail.com wrote:
> couple more cgi programs that connect users to database. But the
> question is how can i prevent people typing the url in the browser and
> letting themselves in without my login.cgi. Is there a way to restrict??
Sure, but that's a question to ask your provider.
Cheers,
Stephan
---
"Dad, why do those people have to use Windows?" -- "Don't stare son;
it's not polite."
------------------------------
Date: 17 Nov 1999 12:54:40 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how to prevent people going around my login.cgi and typing the url of my site??
Message-Id: <3832a590_1@newsread3.dircon.co.uk>
cm95@hotmail.com wrote:
>
>
>
> I have web page that is protected. Only registered members are let in. I
> made a login.cgi that lets registered members in. Then the users is in
> my protected area. The protected area is a normal www address. It is
> like www.somehostname.com/~protected/ In that address I have a
> couple more cgi programs that connect users to database. But the
> question is how can i prevent people typing the url in the browser and
> letting themselves in without my login.cgi. Is there a way to restrict??
> any help would be apprectiated really
This is a question about server configuration not Perl.
/J\
--
"I'm about to say a naughty word so if you're easily offended you can
fuck off now" - Daisy Donovan, The 11 O'Clock Show
------------------------------
Date: Wed, 17 Nov 1999 14:11:38 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: how to prevent people going around my login.cgi and typing the url of my site??
Message-Id: <Pine.HPP.3.95a.991117140841.7489F-100000@hpplus01.cern.ch>
On Wed, 17 Nov 1999 cm95@hotmail.com wrote:
[description of misconceived protection scheme omitted]
> Is there a way to restrict??
Yes, and you haven't got a Perl question, so go and read the
documentation for WWW server access control. I'm afraid you could have
saved yourself some effort by doing that before devising your unworkable
scheme.
[f'up suggested]
------------------------------
Date: Wed, 17 Nov 1999 11:40:02 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: IE and Frames
Message-Id: <Pine.HPP.3.95a.991117113449.7489C-100000@hpplus01.cern.ch>
On Tue, 16 Nov 1999, Joseph Durand wrote:
> I have a defined a frameset with a top and bottom frame. Submitting the
> form on top causes the result to be displayed on the bottom.
>
> print "Window-target: bottom\n";
> print "Content-type: text/html\n\n";
> print "<HTML>\n";
> print "<BODY>\n";
> print "FooBar\n";
> print "</BODY>\n";
> print "</HTML>\n";
>
> This works perfectly on Netscape Navigator
You have a conceptual problem. Your Perl code executes, and delivers
what you evidently want, and sends it over the wire to a WWW browser -
or alternatively to that proprietary browser-like thing known as MSIE.
You therefore don't have a Perl problem.
However, what you want isn't what you need. Your problem is with
whatever it is that you're trying to generate.
And that "whatever" is the topic of quite a different usenet group.
[f'up suggested]
------------------------------
Date: Wed, 17 Nov 1999 13:42:25 +0530
From: RAMANATHAN <ibzobang@vsnl.com>
Subject: IS THIS THE RIGHT GROUP TO POST PERL INSTALLATION PROBLEMS?
Message-Id: <38326369.2E46FB81@vsnl.com>
I have i386 machine running scosysv 3.2. I tried to install perl5.005
with default options "configure -d".
When I run "make", i get the following messages towards the end.
Could any one please tell me what is wrong and what should be done in
rectification? Thanks.
Ramanathan
Messages displayed by make
======================
AutoSplitting perl library
./miniperl -Ilib -e 'use AutoSplit; \
autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
Making DynaLoader (static)
Making B (static)
Making Data::Dumper (static)
Making Fcntl (static)
Making IO (static)
Making IPC::SysV (static)
Making Opcode (static)
Making POSIX (static)
Making SDBM_File (static)
/bin/sh -c true
Making attrs (static)
Making re (static)
cc -o perl perlmain.o lib/auto/DynaLoader/DynaLoader.a
lib/auto/B/B.a lib/auto/Data/Dumper/Dumper.a lib/auto/Fcntl/Fcntl.a
lib/auto/IO/IO.a lib/auto/IPC/SysV/SysV.a lib/auto/Opcode/Opcode.a
lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a
lib/auto/attrs/attrs.a lib/auto/re/re.a libperl.a `cat ext.libs` -lintl
-lnsl_s -ldbm -lld -lm -lc -lPW -lx
*** Error code 13
------------------------------
Date: 17 Nov 1999 09:25:00 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: IS THIS THE RIGHT GROUP TO POST PERL INSTALLATION PROBLEMS?
Message-Id: <3832746c_1@newsread3.dircon.co.uk>
RAMANATHAN <ibzobang@vsnl.com> wrote:
> I have i386 machine running scosysv 3.2. I tried to install perl5.005
> with default options "configure -d".
>
> When I run "make", i get the following messages towards the end.
> Could any one please tell me what is wrong and what should be done in
> rectification? Thanks.
>
> Ramanathan
>
> Messages displayed by make
> ======================
<snip>
> -lnsl_s -ldbm -lld -lm -lc -lPW -lx
> *** Error code 13
Err that error message isnt telling us very much - I would expect to see
an earlier more verbose message (but please dont post the entire output
from make :) or something from 'make test' (If your Perl built).
Also what compiler are you using to build this ? If you are using the
SCO openserver development kit on openserver 5.0.5 and you have (as
you should have done) installed the RS505a release supplement then you
should have also installed the patch 'OSS499A -
rs505a Elf Linker Fix (ver oss499a)' otherwise Perl will not build succesfully
at all.
I have built 5.005.03 successfully on 'SCO_SV pigment 3.2 5.0.5 i386' given
the above ...
This is the libs line from the Makefile - which is the only thing that I
can think that is different from your message to what I would expect.
libs = -lintl -lsocket -lnsl -lndbm -ldbm -lld -lm -lc -lcrypt -lPW -lx
/J\
--
"Boring: See Civil Engineers" - Yellow Pages
------------------------------
Date: Wed, 17 Nov 1999 08:51:35 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Longest match
Message-Id: <383369f6.2817487@news.skynet.be>
Rick Delaney wrote:
>Bart Lateur wrote:
>>
>> How can you easily find the longest substring of only spaces (at least
>> two)? Maybe even using only one regex?
>
> print "($1)\n" if /( +)(?!.*\1)/s;
That is the same regex I came up with, just a little while ago (except
for the //s). It looks like it will work. Note that this will find the
*last* longest string of spaces, if there are more of the same length.
>or if you also want the position where the spaces start
>
> print pos, "($1)\n" if /(?=( +)(?!.*\1))/sg;
Ugh.
Here's another neat little trick I discovered just a little while ago.
How can you avoid using $` and $' and still get at their value?
Like this:
@part = split /$pattern/, $_, 2;
If there's a match, $part[0] will contain the value of $`, $part[-1]
that of $'. Between those, all captured submatches got put. Do a shift()
and a pop() if you want $` and $' removed from them. Example:
$_ = 'My phone number is 555-4310. Got that?';
# movie phone number
@parts = split /((\d+)-(\d+))/, $_, 2;
die "No match" unless @parts>1;
print <<"EOT";
Got a match:
\$` = '$parts[0]'
\$' = '$parts[-1]'
submatches:
\$1 = '$parts[1]'
\$2 = '$parts[2]'
\$3 = '$parts[3]'
EOT
__END__
Got a match:
$` = 'My phone number is '
$' = '. Got that?'
submatches:
$1 = '555-4310'
$2 = '555'
$3 = '4310'
I haven't found any counterexample, where this gives different results
from using the straight regex with $` and $'.
Also note that $part[-1] is '', not undef, if the pattern martch reaches
the end of the string.
Now, back to the story:
$_ = q(this is one that's two this is three and four);
my($pre,$match,$post) = split /( +)(?!.*\1)/, $_, 2;
print <<"EOT";
Pre: '$pre'
Post: '$post'
EOT
__END__
Pre: 'this is one that's two'
Post: 'this is three and four'
--
Bart.
------------------------------
Date: Wed, 17 Nov 1999 09:09:57 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Longest match
Message-Id: <80trc9$rss$1@monet.op.net>
In article <383369f6.2817487@news.skynet.be>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>How can you avoid using $` and $' and still get at their value?
>
>Like this:
>
> @part = split /$pattern/, $_, 2;
It seems more straightforward to use
($prematch, $postmatch) = /(.*?)$pattern(.*)/s;
------------------------------
Date: Wed, 17 Nov 1999 12:32:06 +0100
From: Jean-Charles Savelli <jcs@netexpansion.com>
Subject: Multiple file download
Message-Id: <38329236.B6FD4222@netexpansion.com>
Il s'agit d'un message multivolet au format MIME.
--------------47DDE28475AE688EA3B64546
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I have a web site on Unix/Apche with files which can be
downloaded.
Once the visitor has filled out a form and chosrn in this form a
file for download,
downloading starts with a cgi program
print "Location: $file\n\n";
Now I have to let the visitor choose more than one file, so that
he can
download several files, filing out the form only once.
How can it be done ?
Thanks you
Jean-Charles
--------------47DDE28475AE688EA3B64546
Content-Type: text/x-vcard; charset=us-ascii;
name="jcs.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Carte pour Jean-Charles Savelli
Content-Disposition: attachment;
filename="jcs.vcf"
begin:vcard
n:Savelli;Jean-Charles
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:jcs@netexpansion.com
x-mozilla-cpt:;0
end:vcard
--------------47DDE28475AE688EA3B64546--
------------------------------
Date: Wed, 17 Nov 1999 10:12:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: my ... if -- strange behavior
Message-Id: <38397d9b.7846255@news.skynet.be>
John Lin wrote:
> sub countdown { my $static=9 unless defined $static; print
>static-- }
>P.S. Of course, the above code won't work in current versions of Perl.
>
>If we 'use strict', we get
> Fatal: Global symbol "$static" requires explicit package name
>
>If we use '-w' with 'no strict', we get
> Warning: Name "main::static" used only once: possible typo
>and the result is
> 999999999
So it's not the same $static.
sub countdown {
my $initialized if 0;
my $static = 9 unless $initialized++;
print --$static
}
for(1..9) { countdown }
__END__
8-1-2-3-4-5-6-7-8
Amusing, but useless. And I don't get it. Why does it *increment*?
--
Bart.
------------------------------
Date: Wed, 17 Nov 1999 13:05:07 +0100
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: my ... if -- strange behavior
Message-Id: <383299F3.4CFDA79F@ife.ee.ethz.ch>
Bart Lateur wrote:
> sub countdown {
> my $initialized if 0;
> my $static = 9 unless $initialized++;
> print --$static
> }
>
> for(1..9) { countdown }
> __END__
> 8-1-2-3-4-5-6-7-8
>
> Amusing, but useless. And I don't get it. Why does it *increment*?
going from -1 to -2 is only an increment for some uncommon values of
increment...
It is strange indeed.
The first time around, $initialized goes frum undef to 1 and $static
from 9 to 8
In the second call, $initialized: 1 -> 2 and $static: undef->-1
The question is: why is $static initialized to undef, but only once?
A possible answer:
If perl sees a 'my' followed by a 'if (false)', it initializes that
variable to undef once. If it is followed by 'if (true)' that
initialization is forgotten, the next 'my $x if false' will put $x to
undef again (once)
Verification with:
use Data::Dumper;
sub countdown {
my $initialized if 0;
print "ini: ", Dumper($initialized);
my $static = 9 unless $initialized++%3;
print "stat: ", Dumper($static--);
}
The solution using my ... if:
sub countdown2 {
my $static if 0;
$static = shift unless defined $static; #abigail: $static ??= shift
print --$static."\n";
}
countdown2 9 for (1..9);
And the correct way to do it as shown in the docs (twice, differently):
{
my $static = 9;
sub countdown3 {
print --$static."\n";
}
}
countdown3 for (1..9);
- Alex
------------------------------
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 1405
**************************************