[16050] in Perl-Users-Digest
Perl-Users Digest, Issue: 3462 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 23 11:05:31 2000
Date: Fri, 23 Jun 2000 08:05:17 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <961772717-v9-i3462@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 23 Jun 2000 Volume: 9 Number: 3462
Today's topics:
ANNOUNCE: Win32API::Joystick available <lilleyb001@hawaii.rr.com>
chomp on Array? <skpurcell@hotmail.com>
Re: chomp on Array? <naidenm@americasm01.nt.com>
Re: chomp on Array? (Bill)
Re: chomp on Array? (Tom Vaughan)
Re: chomp on Array? <red_orc@my-deja.com>
Re: Creating a cause from information. (Anno Siegel)
Re: Creating a cause from information. malverian@my-deja.com
Re: daemon exits upon loggin out <sariq@texas.net>
Re: Dereferencing a two dimensional array? (Tad McClellan)
Re: Dereferencing a two dimensional array? <mjcarman@home.com>
Re: eof for sendmail .. <care227@attglobal.net>
Re: foreach loop and sendmail .. <care227@attglobal.net>
More error checking with Getopt undergronk@yahoo.com
Re: padding a string with leading zeros <sariq@texas.net>
Re: Passing filehandles to subroutines (Tad McClellan)
Re: Perl 5.6 says 'syntax error', Perl 5.005_03 does no <jboes@eoexchange.com>
Re: PERL Trouble aredij@my-deja.com
POST requests in Perl (Phil)
Re: POST requests in Perl <tony_curtis32@yahoo.com>
Re: POST requests in Perl amitr@w-o-i.com
Re: POST requests in Perl (David Salgado)
Re: PPM Hotfix Fails bayers@my-deja.com
Re: Problem with MLDBM.pm <naidenm@americasm01.nt.com>
Re: Problem with Perl/ISAPI (David Wall)
Re: Problems working with CPAN and ftp... (Steven Smolinski)
QUESTION -> From perl to C(++) ? <tkonink@horizon.nl>
Re: QUESTION -> From perl to C(++) ? <blah@nospam.com>
Re: regex engin's undocumented behaviour? <care227@attglobal.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 23 Jun 2000 06:43:33 GMT
From: "Benji Lilley" <lilleyb001@hawaii.rr.com>
Subject: ANNOUNCE: Win32API::Joystick available
Message-Id: <4HH45.19079$9W1.418699@news-west.usenetserver.com>
Win32API::Joystick version 1.01
The module will allow you to get x,y, and z axes positions and button status
of joystick devices via Windows API calls. It is simple to use - has an OO
interface with two methods and one utility function. Aside from getting
current position you can also get device capability information like min/max
axis values, number of buttons, number of axes and more. Now you can get
joystick input into your Perl programs!
The module is designed for Win32 ports of Perl and requires you have the
Win32 module installed.
The module will soon be available on CPAN at
authors/id/B/BD/BDLILLEY
If you would like a copy sooner, let me know and I will email it to you.
Regards,
Ben
------------------------------
Date: Fri, 23 Jun 2000 07:31:03 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: chomp on Array?
Message-Id: <395358c9$0$19880@wodc7nh1.news.uu.net>
Hello,
I was reading "Andrew Johnson's Elements of Programming With Perl" last
night, and ran into an example of chomping an array, and I have never seen
this before.
I thought that chomp would take off the last newline in a string.
chomp(my @data = <DATA>);
Question: Does anyone know why this works? And does it do each line, or does
it just chomp the last line in the text that is read in.
Thanks,
Scott
------------------------------
Date: Fri, 23 Jun 2000 08:47:16 -0400
From: "Markachev, Naiden [SKY:4Y21:EXCH]" <naidenm@americasm01.nt.com>
Subject: Re: chomp on Array?
Message-Id: <39535C54.589A7D3D@americasm01.nt.com>
chomp works on both types scalars and lists. In case of a list though it
removes trailing '\n' from all members of that list if present.
Ragards,
Naiden
spurcell wrote:
>
> Hello,
> I was reading "Andrew Johnson's Elements of Programming With Perl" last
> night, and ran into an example of chomping an array, and I have never seen
> this before.
> I thought that chomp would take off the last newline in a string.
> chomp(my @data = <DATA>);
>
> Question: Does anyone know why this works? And does it do each line, or does
> it just chomp the last line in the text that is read in.
>
> Thanks,
> Scott
--
"Witty quotes mean nothing" -- Voltaire
------------------------------
Date: Fri, 23 Jun 2000 12:52:28 GMT
From: wfeidt@cpcug.org (Bill)
Subject: Re: chomp on Array?
Message-Id: <8F5C55914wfeidthiscom@207.126.101.97>
skpurcell@hotmail.com (spurcell) wrote in
<395358c9$0$19880@wodc7nh1.news.uu.net>:
>Hello,
>I was reading "Andrew Johnson's Elements of Programming With Perl" last
>night, and ran into an example of chomping an array, and I have never
>seen this before.
>I thought that chomp would take off the last newline in a string.
>chomp(my @data = <DATA>);
>
>Question: Does anyone know why this works? And does it do each line, or
>does it just chomp the last line in the text that is read in.
Try "perldoc -f chomp", the last line of which states:
"If you chomp a list, each element is chomped, and the total number of
characters removed is returned."
HTH,
Bill Feidt
wfeidt@cpcug.org
------------------------------
Date: 23 Jun 2000 12:56:29 GMT
From: vaughan@itdc.edu (Tom Vaughan)
Subject: Re: chomp on Array?
Message-Id: <8ivmpt$6vf$1@malgudi.oar.net>
Perl in a Nutshell:
chomp removes all line ending characters ( or the value in $/ ) in a list .
If $/ is empty, chomp removes all newlines.
Tom
spurcell (skpurcell@hotmail.com) wrote:
: Hello,
: I was reading "Andrew Johnson's Elements of Programming With Perl" last
: night, and ran into an example of chomping an array, and I have never seen
: this before.
: I thought that chomp would take off the last newline in a string.
: chomp(my @data = <DATA>);
: Question: Does anyone know why this works? And does it do each line, or does
: it just chomp the last line in the text that is read in.
: Thanks,
: Scott
------------------------------
Date: Fri, 23 Jun 2000 13:08:58 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: chomp on Array?
Message-Id: <8ivngu$u7j$1@nnrp1.deja.com>
In article <395358c9$0$19880@wodc7nh1.news.uu.net>,
"spurcell" <skpurcell@hotmail.com> wrote:
> Hello,
> I was reading "Andrew Johnson's Elements of Programming With Perl"
> last night, and ran into an example of chomping an array, and I have
> never seen this before.
> I thought that chomp would take off the last newline in a string.
> chomp(my @data = <DATA>);
>
> Question: Does anyone know why this works? And does it do each line,
> or does it just chomp the last line in the text that is read in.
>
> Thanks,
> Scott
>
>
Did you read the documentation on chomp?
perldoc perlfunc
"If you chomp a list, each element is chomped, and the total number of
characters removed is returned"
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 23 Jun 2000 10:16:36 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Creating a cause from information.
Message-Id: <8ivde4$osp$1@lublin.zrz.tu-berlin.de>
<malverian@my-deja.com> wrote in comp.lang.perl.misc:
>
>> You *are* aware that you're throwing away a line from SOCK each time
>> through the loop? It might be okay, but you may want to work with
>> $_ instead of reading a new line into $data.
>
>Are you positive I am losing a line? When i tell it to print STDOUT
>$data
>It prints it exactly how it should...
Positive. Your original code looked like this ( my comments):
> while(<SOCK>) # This reads a line from SOCK into $_
> {
> $data = <SOCK>; # This reads another line into $data.
# do something with $data
# $_ never gets looked at
> }
For a quick check, replace $data = <SOCK> with $data = $_. You should
get about twice as many trips through the loop. Then you can do away
with $data altogether and work with $_ instead. This will simplify a
few things.
Anno
------------------------------
Date: Fri, 23 Jun 2000 14:27:36 GMT
From: malverian@my-deja.com
Subject: Re: Creating a cause from information.
Message-Id: <8ivs44$1s3$1@nnrp1.deja.com>
> For a quick check, replace $data = <SOCK> with $data = $_. You should
> get about twice as many trips through the loop. Then you can do away
> with $data altogether and work with $_ instead. This will simplify a
> few things.
>
> Anno
>
I am still slightly confused.. will this speed up or slow down my
program? You said it will to through the loop twice as many times..
One other question..
If alot of information was coming through the socket, are you saying I
am losing data and it is sometimes not triggering the ifs when I read
it into $data?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 23 Jun 2000 09:12:18 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: daemon exits upon loggin out
Message-Id: <39537042.28F1F82F@texas.net>
peredina wrote:
>
> Hi All,
>
> OS: Solaris 2.7
>
> I have a pgm that runs as a daemon. On a certain machine, when I start
> the process and logout, the process disappears. Normally the process
> would detach from the tty and keep running...
>
> Any quick pointer as to where I should check for inconsistencies?
The FAQ.
perldoc -q daemon
- Tom
------------------------------
Date: Fri, 23 Jun 2000 07:07:17 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Dereferencing a two dimensional array?
Message-Id: <slrn8l6knl.t0.tadmc@maxim.metronet.com>
On Fri, 23 Jun 2000 08:22:23 GMT, Shannon Jacobs <shanen@my-deja.com> wrote:
>Well, I've seen the kind of stuff that goes here, so I know I'll get
>flamed for the clueless newbie question
You should not be flamed for asking a newbie question.
You should be flamed for wasting other people's time by
not trying -w and "use strict" before posting.
>This line works:
> $re[$i] = [split /\t/,$results[$i]];
>
>This line does NOT work:
> @jr <= $re[$i];
Turn on warnings. You have the wrong operator there.
@jr , $re[$i]; # this is the same as what you have above
>I have tried many variations. I have been
>all over the camel book, the docs,
perldoc perlreftut
perldoc perlref
Both of those show how to dereference in the "Using references"
section. Quite surprising that you did not read that section,
since you want to use a reference...
> FAQs, and various parts of the
>newsgroups and Internet and cannot figure out how to pass the correct
>value to $jr.
^^^
There is no $jr in your code...
>[But now that I look at what I just typed, I bet the
>problem is that $reslist is not REALLY the same thing as $results, but
>I don't have more time just now, so I'm going to post this anyway.]
I see.
You can't spend your time on it, so you are going to spend other
people's time on it.
That's quite selfish.
>By the way, if I don't get flamed too excessively, I'll probably post
>some hilarious examples of my code and ask how to do the same things
>properly.
That's fine. Just _carefully_ check the docs first. If the answer
isn't there, post away.
----------------------------
#!/usr/bin/perl -w
use strict;
my @re;
my $results = "foo\tbar\tbaz";
$re[0] = [split /\t/, $results];
my @jr = @{$re[0]};
foreach (@jr) {
print "$_\n";
}
----------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 23 Jun 2000 08:10:33 -0500
From: Michael Carman <mjcarman@home.com>
To: Shannon Jacobs <shanen@my-deja.com>
Subject: Re: Dereferencing a two dimensional array?
Message-Id: <395361C9.AC8983E7@home.com>
Posted and courtesy copy sent.
Shannon Jacobs wrote:
>
> Well, I've seen the kind of stuff that goes here, so I know I'll get
> flamed for the clueless newbie question
Have you tried the docs? If not, then you probably deserve any flaming,
especially since you've implied having lurked long enough to know
better. But if you did, and you're still stumped, then post away.
> This line works:
> @jr = split /\s/,$reslist[$i];
>
> This line works:
> $re[$i] = [split /\t/,$results[$i]];
>
> This line does NOT work:
> @jr <= $re[$i];
Well, what are you trying to do in that last line? You have an array on
the LHS, a scalar operator (so you'll evaluate the array in a scalar
context and get the length) and an array reference on the RHS.
Taking a WAG (Wild Ass Guess) from you subject, you appear to be after
this:
@{$re[$i]}
Which will deref $re[$i] and give you an array. That still leaves me
wondering what you're trying to do with the "@a <= @b" construct. What
it *will* do is compare lengths.
> I have tried many variations. I have been all over the camel book,
> the docs, FAQs, and various parts of the newsgroups and Internet
> and cannot figure out how to pass the correct value to $jr.
Thank you for trying. Did you try 'perldoc perlref'? :)
BTW, $jr is not the same as @jr. In fact, they are completely
independant. $jr is a scalar, @jr is an array, %jr is a hash. Perl can
keep them sorted out, and know when you want the scalar and when you
want an array or hash element (or slice, etc.). You may have a little
more difficulty, and for that reason it is generally advised to *not*
use the same name for a scalar/array/hash.
> [But now that I look at what I just typed, I bet the
> problem is that $reslist is not REALLY the same thing as $results, but
> I don't have more time just now, so I'm going to post this anyway.]
*shrug* Is it a typo? If so 'use strict' will help you catch things like
that. See 'perldoc strict'
-mjc
------------------------------
Date: Fri, 23 Jun 2000 09:49:21 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: eof for sendmail ..
Message-Id: <39536AE1.E20253D3@attglobal.net>
Villy Kruse wrote:
>
>
> By the way, the eof to sendmail is like any other eof to any other program
> you might be piping to. You send it when you close the pipe.
>
> However, you might need the -oi option or you might cut your message short
> if you happen to send a period all alone on a line.
>
Or send a period all alone to end the message.
------------------------------
Date: Fri, 23 Jun 2000 09:21:53 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: foreach loop and sendmail ..
Message-Id: <39536471.37201244@attglobal.net>
bschaettle@olmmed.org wrote:
>
>
> .....what do you mean by that last comment -- "give sendmail its . all
> alone to signal EOF" ??
>
Last time I was manually crafting a message to a sendmail process,
a . on a line all by its self was the signal to send the message.
I'd assume that hasn't changed.
------------------------------
Date: Fri, 23 Jun 2000 09:58:37 GMT
From: undergronk@yahoo.com
Subject: More error checking with Getopt
Message-Id: <8ivcc9$mn3$1@nnrp1.deja.com>
I have concocted a small script to read in a text file and do something
with every line. I use Getopt::Std to read in command line arguments.
I want to provide sensible defaults if no args are supplied. My
attempt is shown below.
#!/usr/bin/perl -w
use Getopt::Std;
my $host;
our $opt_f;
getopt('f:');
@ARGV = ('./hosts') unless @ARGV;
if ($opt_f) {
open (TMP, ">$opt_f") or die;
} else {
open (TMP, '>./hosts.out') or die;
}
print "$ARGV[0]\n";
This works, but I was wondering if there was an easier way to provide a
default for $opt_f.
TIA
Scott Kirk
undergronk@@yahoo.com -
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 23 Jun 2000 09:53:55 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: padding a string with leading zeros
Message-Id: <39537A03.3A2512A9@texas.net>
ez4gl wrote:
>
> In trying to pad IP address octets with leading zeros for a
> report I tried something like:
>
> $octet = ((3 - length($octet)) x '0') . $octet;
Please learn to help yourself. We'll all be better off.
perldoc -q pad
perldoc perldoc
perldoc perl
- Tom
------------------------------
Date: Fri, 23 Jun 2000 07:15:33 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Passing filehandles to subroutines
Message-Id: <slrn8l6l75.t0.tadmc@maxim.metronet.com>
On 23 Jun 2000 01:12:20 -0700, Mike <tcsh@holly.colostate.edu> wrote:
>gbacon@HiWAAY.net (Greg Bacon):
>>
>> to help yourself. That's why we ask people to read the FAQ first,
>> *BEFORE* posting. As you've so nicely demonstrated, when people don't
>
>The FAQ is not something I can see reading from start to finish.
Nobody expects you to.
>When I need
>an answer, I search for it.
That is what is expected.
>I didn't think is was a FAQ, as a search for
>'filehandle' at perlfaq.com didn't turn up the needed information.
perlfaq.com is NOT the Perl FAQ.
The Perl FAQ is what gets installed along with perl itself.
>> You need to upgrade. It's often easier to just grep the pods. Do
>> you know how to find the pods in your Perl installation?
>
>I'm not the sysadmin and have a tight disk usage quota so an upgrade isn't
>possible.
Getting snippy at _me_ because your sysadmin isn't doing his/her
job is unfair.
You should get mad at the _cause_ of your problem, and that
isn't me.
>But thanks for the grepping the pods idea, I'll surely use that
>in the future.
Thank you.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 23 Jun 2000 09:24:55 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Re: Perl 5.6 says 'syntax error', Perl 5.005_03 does not
Message-Id: <39536659$0$1493$44a10c7e@news.net-link.net>
Jeff Boes wrote:
>
> ---start of code snippet---
> sub gtkpack($@) {
> my $box = shift;
> gtkpack_($box, map { 1, $_} @_);
> }
> ---end---
>
> This little bit of code compiles cleanly under perl 5.005_03, but not
> under 5.6.0, where it flags the '} @_' area as containing a syntax
> error.
(Following up my own post here.)
I've read the half-dozen or so responses, for which I'm grateful. But I
guess I was looking for something a little more definite. Is this a
mis-use of the Perl syntax under 5.005_03 (in other words, a bug in the
original Perl code supplied by Mandrake)? Or is this a flaw in Perl 5.6
which fails to be backward-compatible with previously valid syntax?
I've assumed the former, and filed a bug report with Mandrake. I have
not submitted this as a Perl bug, but I will if the more experienced
folks here think I should.
--
Jeff Boes |perl -e 'print map(substr("
|jboes@eoexchange.com
Sr. S/W Engineer |acehjklnoprstu,\n",$i+=$_,1),(5,9, |616-381-9889 ext
18
Change Technology|-2,1,-13,1,7,1,4,-9,-1,8,-11,10,-7 |616-381-4823 fax
EoExchange, Inc. |,8,-4,-7,4,-3,1,4,-3,8,4,1));'
|www.eoexchange.com
------------------------------
Date: Fri, 23 Jun 2000 11:22:46 GMT
From: aredij@my-deja.com
Subject: Re: PERL Trouble
Message-Id: <8ivh9t$pvn$1@nnrp1.deja.com>
.
> > #!/usr/bin/perl -w
> >
> > and it SHOULD be the FIRST line.
> >
Hello <whatever ur name is>
Perl allows u to write any loose code. that is if u want to use
variables without declaring it...its fine. but not advisable.
so,
-w option tells u about the "warnings" ur perl script has(if any).
also, it is a good programming practice to have
use strict;
early in ur script.
then whenever u want to use any variable
all u have to say is
my $val = 10; etc.
happy perl coding
regards
Amit
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 23 Jun 2000 12:43:37 GMT
From: root@phil-the-nerd.org (Phil)
Subject: POST requests in Perl
Message-Id: <slrn8l6j2j.8i4.root@Enigma.RedBrick.DCU.IE>
There are some forms on the web, I want to write a small perl gateway to. Now
I know how to use a GET request to get the data, but I want to use POST. Could
anyone shed any light on how you would go about doing such a thing?
Appreciated,
Phil.
------------------------------
Date: 23 Jun 2000 08:27:00 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: POST requests in Perl
Message-Id: <87aegcr0ij.fsf@limey.hpcc.uh.edu>
>> On 23 Jun 2000 12:43:37 GMT,
>> root@phil-the-nerd.org (Phil) said:
> There are some forms on the web, I want to write a small
> perl gateway to. Now I know how to use a GET request to
to ... what ??
> get the data, but I want to use POST. Could anyone shed
> any light on how you would go about doing such a thing?
perldoc CGI - the standard CGI module handles GET and POST
transparently.
Or do you want to write something that submits a POST?
perldoc LWP::UserAgent
perldoc HTTP::Request
hth
t
--
"Trying is the first step towards failure"
Homer Simpson
------------------------------
Date: Fri, 23 Jun 2000 13:27:24 GMT
From: amitr@w-o-i.com
Subject: Re: POST requests in Perl
Message-Id: <8ivoja$v3e$1@nnrp1.deja.com>
In article <slrn8l6j2j.8i4.root@Enigma.RedBrick.DCU.IE>,
phil@redbrick.dcu.ie wrote:
> There are some forms on the web, I want to write a small perl gateway
to. Now
> I know how to use a GET request to get the data, but I want to use
POST. Could
> anyone shed any light on how you would go about doing such a thing?
> Appreciated,
> Phil.
>
In GET method the information is passed using the environment variable
(QUERY_STRING). But with POST method it is written to the STDOUT and
thats input to ur perl/cgi script.
so u need to parse that form data.
I have used CGI_Lite.pm very effective. It parses the form data and
gives you a hash(key value pair).
I hope u got ur inputs.
cheers.
Amit
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 23 Jun 2000 13:41:10 GMT
From: david@digitalronin.nospam.com (David Salgado)
Subject: Re: POST requests in Perl
Message-Id: <39536871.20036350@news.demon.co.uk>
On 23 Jun 2000 12:43:37 GMT, root@phil-the-nerd.org (Phil) wrote:
>There are some forms on the web, I want to write a small perl gateway to. Now
>I know how to use a GET request to get the data, but I want to use POST. Could
>anyone shed any light on how you would go about doing such a thing?
>Appreciated,
>Phil.
If you're using CGI.pm you don't need to care whether the data came
from a GET or a POST, you just use something like;
$value = $cgi->param('foo');
and you get the data, however it was submitted.
See the docs for CGI.pm for more info.
HTH
David
--------------------------------------------------------------
The Daily Me - All your favourite
websites with a single click
http://www.dailyme.org
--------------------------------------------------------------
------------------------------
Date: Fri, 23 Jun 2000 12:43:39 GMT
From: bayers@my-deja.com
Subject: Re: PPM Hotfix Fails
Message-Id: <8ivm1o$t6c$1@nnrp1.deja.com>
Its permissions are set to 'everyone' and it has no attributes set.
Very strange.
In article <8iv3jj$3fs$1@orpheus.gellyfish.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Thu, 22 Jun 2000 15:26:00 GMT bayers@my-deja.com wrote:
> > I've encluded the output of the hotfix below. The hotfix fails to
> > repair PPM.
> >
> > Any ideas? I might have to go back to an older version.
> >
> > ====================================
> >
> > C:\Perl\bin>perl -x -S "ppm" verify --upgrade --location=. PPM
> > Cannot forceunlink C:\Perl\bin\ppm.bat: Permission denied at
>
> So why dont you change attributes of the file and run it again ?
>
> /J\
> --
> ** This space reserved for venue sponsor for yapc::Europe **
> <http://www.yapc.org/Europe/>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 23 Jun 2000 08:01:06 -0400
From: "Markachev, Naiden [SKY:4Y21:EXCH]" <naidenm@americasm01.nt.com>
Subject: Re: Problem with MLDBM.pm
Message-Id: <39535182.FE39AFB5@americasm01.nt.com>
I guess this problem has something to do with how big the data which
$entry points to is..
I striped all the ' ' fields to '' from the input file and now I am
able to store not 4 but 5 'products'. Weird.
One should be able to do better than that. Any workarounds ?
Thanks,
Naiden
------------------------------
Date: 23 Jun 2000 10:59:54 -0400
From: darkon@one.net (David Wall)
Subject: Re: Problem with Perl/ISAPI
Message-Id: <8F5C6BD68darkononenet@206.112.192.118>
notonyourlife@noway.com (Paul) wrote in <395291b6@pink.one.net.au>:
>Platform: IIS 5 on Windows 2000
>Latest version of ActivePerl. (got it down last week)
>
[snip]
>When I run this perl script from the command line or as a CGI in IIS via
>perl.exe "%s" "%s" it works fine. When I run it thru ISAPI as PERLIS.DLL
>it terminates with a SMTP error.
I had the same problem. It sounds like you've got it working by making
sure perl.exe runs it instead of PerlIS.dll. Anyway, it's been added to the
bugs database; see http://bugs.activestate.com/ActivePerl/PerlIS?id=342 .
I suppose we could always wipe Windoze off the server and replace it with
Linux. :-) (Actually, as soon as some of the content that uses ActiveX
stuff moves to another server here, that's exactly what I plan to to. I'm
increasing tired of the vagaries of NT.)
--
David Wall
darkon@one.net
------------------------------
Date: Fri, 23 Jun 2000 11:19:06 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: Problems working with CPAN and ftp...
Message-Id: <slrn8l6hsa.4an.sjs@john.sympatico.ca>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>In comp.lang.perl.misc Sergey Gribov <sergey@cgen.com> wrote:
>> I have the firewall setup which requires me to work with passive ftp.
>> CPAN tries to use ftp, NET::FTP & LWP, but all of them fails because
>> I can't use active ftp...
[...]
>> How can I configure CPAN to use passive ftp?
>You will need to configure Net::FTP to use passive mode (LWP uses this
>for ftp: schemes).
Net::FTP also looks at an environment variable to determine if it should
be passive. You can just 'export FTP_PASSIVE=1' in a bash shell, and then
start CPAN.
HTH
Steve
------------------------------
Date: Fri, 23 Jun 2000 13:02:48 GMT
From: Thomas de Konink <tkonink@horizon.nl>
Subject: QUESTION -> From perl to C(++) ?
Message-Id: <39535F47.E030B3C1@horizon.nl>
Hello,
If this big problem. I once made a internet-service with several Perl
(Cgi) scripts.
Now, this service is very popular in the Netherlands. This causes a load
much to high for my Linux-server. This, of course, is a known probling
when using Perl.
My QUESTION !
- Is it possible to translate perl to C++ : Is there a tool/module which
I can use, to translate Perl-scripts into executable binairies or
C-source code.
I hope you can help me. Thanks in advance.
Thomas de Konink
------------------------------
Date: Fri, 23 Jun 2000 15:16:15 +0200
From: Marco Natoni <blah@nospam.com>
Subject: Re: QUESTION -> From perl to C(++) ?
Message-Id: <3953631F.4E7B50C1@nospam.com>
Thomas,
Thomas de Konink wrote:
> I once made a internet-service with several Perl (Cgi) scripts.
> Now, this service is very popular in the Netherlands. This causes
> a load much to high for my Linux-server. This, of course, is a
> known probling when using Perl. My QUESTION ! - Is it possible
> to translate perl to C++ : Is there a tool/module which I can use,
> to translate Perl-scripts into executable binairies or C-source
> code.
You can translate your Perl code into C using a feature of Perl itself
(perldoc perlcc) but, given the quality of the produced code, I figure
that improvement of performances will be not as high as you hope. I
suggest you to consider lighter solutions like PHP or Perl modules for
Apache.
Best regards,
Marco
------------------------------
Date: Fri, 23 Jun 2000 09:46:18 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: regex engin's undocumented behaviour?
Message-Id: <39536A2A.4FFA725C@attglobal.net>
Tad McClellan wrote:
>
> On Thu, 22 Jun 2000 10:29:25 -0400, Drew Simonis <care227@attglobal.net> wrote:
> >Tad McClellan wrote:
>
> err, you snipped the regex that is being discussed.
>
> I went and found it, and put it back in:
>
> >>> /^(aa(bb)?)+$/;
>
> >> aabbaa
> >> ^^^^
> >>
> >> That much matches, then the engine needs to start over again
> >> because it is not yet at end-of-string.
> >>
> >> The dollar-digit variables are reset to undef when it starts over.
>
> Ack!
>
> This followup gives me a chance to fix that last sentence:
>
> The dollar-digit variables that don't match are reset to undef
> when the match *succeeds*.
>
That makes alot more sense.
> >> aabbaa
> >> ^^
> >>
> >> That matches the second time around (allowed by the +).
> >>
> >
> >I thought the regex engine would always hold a marker for the first
> >position matched and backtrack to it??
>
> Backtracking only happens when the engine cannot match.
So the engine used by perl does not require the longest _leftmost_
match? (but does support some _other_ POSIX type stuff, like
[[.lower.]]?)
>
> It _can_ match in this case, so there is no backtracking
> in that match.
>
> >What you are saying makes
> >logical sense, but it sure isn't the intuitive way of matching, IMO.
>
> You misunderstand backtracking, I think.
Amen to that. I hate these darn things called regular expressions.
------------------------------
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 3462
**************************************