[14260] in Perl-Users-Digest
Perl-Users Digest, Issue: 1669 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 19 20:52:10 1999
Date: Sun, 19 Dec 1999 17:51:58 -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: <945654718-v9-i1669@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 19 Dec 1999 Volume: 9 Number: 1669
Today's topics:
Re: CGI::carp errors(?) in perlV5.005 <dnichols@fhcrc.org>
Re: CGI::carp errors(?) in perlV5.005 comingofage@my-deja.com
Re: Checking if a URL exists in Perl <petersen@pixelpark.com>
Re: Checking if a URL exists in Perl (Abigail)
Re: Checking if a URL exists in Perl (Abigail)
client - server problem <pruefer@idnet.de>
Re: Client/Server and Perl <tbornhol@prioritytech.com>
clobbering of hashes <hardpack@my-deja.com>
Re: clobbering of hashes (Anno Siegel)
Re: clobbering of hashes lee.lindley@bigfoot.com
Re: clobbering of hashes (Anno Siegel)
Re: clobbering of hashes lee.lindley@bigfoot.com
Comparing Hashes <asquith@macconnect.com>
Re: Comparing Hashes (Anno Siegel)
Compile perl program under Linux <wiltam@singnet.com.sg>
Re: Compile perl program under Linux <chen@slangsoft.com>
Re: Compile perl program under Linux <cassell@mail.cor.epa.gov>
Re: Compile perl program under Linux <wiltam@singnet.com.sg>
Re: Compile perl program under Linux (Abigail)
Re: Compile perl program under Linux (Simon Cozens)
Re: Compile perl program under Linux (John Stanley)
concurrent GET requests preetham@rocketmail.com
Re: concurrent GET requests (brian d foy)
Re: concurrent GET requests <uri@sysarch.com>
Re: concurrent GET requests (brian d foy)
Re: concurrent GET requests <uri@sysarch.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 15 Dec 1999 17:27:36 +0000
From: Douglas Nichols <dnichols@fhcrc.org>
To: letdougin@my-deja.com
Subject: Re: CGI::carp errors(?) in perlV5.005
Message-Id: <3857CF88.BE2C587@fhcrc.org>
I wish I could offer some help but instead I am waiting anxiously to see
what answer you get from someone. I have been trying to get an answer to
this for quite a while. First I thought it was me, but then after careful
examination of the Carp code I see that I seem to be setting things up
correctly.
cheers
dn
letdougin@my-deja.com wrote:
> In article <3847F59E.DF0AD783@vpservices.com>,
> Jeff Zucker <jeff@vpservices.com> wrote:
> > letdougin@my-deja.com wrote:
> > >
> > > OK here's a small prog:
> >
> > True, it is small :-).
> >
> > > #!/usr/bin/perl -w
> > > use strict;
> > > use CGI::Carp qw(fatalsToBrowser);
> > >
> > > die "bye\n";
> > >
> > > Thing is, if you use perlV5.005, the error doesn't get sent to
> the
> > > browser.
> >
> > You have to tell us more information about your setup than you have
> > because that script works exactly as it should with my Perl 5.005
> > (activeState on win95) and my CGI::Carp (1.13). Are you perhaps
> running
> > under mod_perl for example? Do you have the correct shebang line? Do
> > other scripts and modules work?
> >
> > --
> > Jeff
> >
>
> CGI::carp(1.13) does work, I'm having the problem with v1.14, which
> checks to see if you're using perl v5.005, if you are then it uses
> different code to decide whether or not the fatals should be sent to the
> browser (different to CGI::carp(1.13)). As far as I can this new code
> will never decide to send fatals to browser, as long as the script is
> run under mod_perl, which is the case, to answer one question. The rest
> seems fine, to answer the others. Is running under mod_perl the problem,
> or is there something else?
>
> Doug.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
Cheers, dn
Douglas Nichols dnichols@fhcrc.org
---------------------------------------------------------------
National Wilms Tumor Study Group 206.667.4283
Seattle, WA
------------------------------
Date: Sat, 18 Dec 1999 22:18:22 GMT
From: comingofage@my-deja.com
Subject: Re: CGI::carp errors(?) in perlV5.005
Message-Id: <83h17c$46a$1@nnrp1.deja.com>
Although I did not initiate this thread, the problem I am experiencing
seems related. The error I receive is the standart http 500 (server
error). My error rate is 2% in one perl script and 5.5% in another.
Once the error occurs, I can repost the exact same information and
successfully run the script. I thought my scripts were properly error-
handled, and cannot trap what is going on. I suspect that the simple
code used in the earlier discussion of this thread would yield the same
results.
In article <944222059.940716@shelley.paradise.net.nz>,
"Peter Sundstrom" <send@no.junk.mail> wrote:
>
> <letdougin@my-deja.com> wrote in message news:8268eo$go0
$1@nnrp1.deja.com...
> > I am finding that latest version of CGI::carp
> > doesn't return all fatals to the browser window
> > when using perl5.005. Anyone got any clues?
>
> Which particular errors?
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 15 Dec 1999 19:25:19 +0000
From: Jonas Petersen <petersen@pixelpark.com>
Subject: Re: Checking if a URL exists in Perl
Message-Id: <3857EB1F.1C9B2323@pixelpark.com>
Yuval Kalev schrieb:
> Hi !
> I have a problem, and I cannot seem to overcome it.
> I have a form in which the users add a url, and the cgi is supposed to check
> if the url exists, and if
> so, index it. Otherwise, throw an exception or something.. But I can't seem
> to find how to check if
> the file exists. Can you help me?
Try the Module LWP::Simple (or LWP::UserAgent for more advanced things)
Jonas
------------------------------
Date: 16 Dec 1999 01:30:18 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Checking if a URL exists in Perl
Message-Id: <slrn85h5na.4mq.abigail@alexandra.delanet.com>
Yuval Kalev (icelord@netvision.net.il) wrote on MMCCXCVI September
MCMXCIII in <URL:news:836eqc$fqd$1@news.netvision.net.il>:
"" Hi !
"" I have a problem, and I cannot seem to overcome it.
"" I have a form in which the users add a url, and the cgi is supposed to check
"" if the url exists, and if
"" so, index it. Otherwise, throw an exception or something.. But I can't seem
"" to find how to check if
"" the file exists. Can you help me?
I am confused by this question. The user "adds" a URL, then the "cgi"
(I presume you mean 'a program using CGI to interface with the server',
as CGI is a protocol, on a program) checks whether the URL exists
(I'm not sure what you mean by "a URL exists" - you probably have in your
mind some restricted definition of "URL", and some idea what "exists"
means) and then you suddenly make the leap to "check if the file exists".
The answer to the latter is trivially found in the manual, so I won't
bother telling you. But what has that to do with URLs?
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 16 Dec 1999 01:32:47 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Checking if a URL exists in Perl
Message-Id: <slrn85h5rv.4mq.abigail@alexandra.delanet.com>
Jonas Petersen (petersen@pixelpark.com) wrote on MMCCXCVII September
MCMXCIII in <URL:news:3857EB1F.1C9B2323@pixelpark.com>:
@@ Yuval Kalev schrieb:
@@
@@ > Hi !
@@ > I have a problem, and I cannot seem to overcome it.
@@ > I have a form in which the users add a url, and the cgi is supposed to check
@@ > if the url exists, and if
@@ > so, index it. Otherwise, throw an exception or something.. But I can't seem
@@ > to find how to check if
@@ > the file exists. Can you help me?
@@
@@ Try the Module LWP::Simple (or LWP::UserAgent for more advanced things)
Really? Is LWP::Simple going to tell me anything about FTP urls? How about
mailto? news? nntp? telnet? gopher? prospero? wais? mid? nfs? ldap? imap?
z39_50? cid? vemmi?
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Dec 1999 15:43:06 -0000
From: "Claus Prüfer" <pruefer@idnet.de>
Subject: client - server problem
Message-Id: <83iqtk$i7m$1@newsreader.gigabell.net>
hi m8es...
ive got a network programming problem:
i use the socket module:
use socket;
now i want to set up a "SERVER" that is "listening" and a "CLIENT" that
connects to the server. this should be html-based...
this is the code for the client:
#!/usr/bin/perl
use Socket;
use CGI;
$query = new CGI;
print $query->header;
print $query->start_html(-title=>'Send
SMS!',-link=>'#1d338b',-vlink=>'#7133e3',-alink=>'ff0000');
print '<p><font size="2" face="Verdana,Arial"></p>';
my $proto = getprotobyname('tcp');
socket(SH, PF_INET, SOCK_STREAM, $proto) || die $!;
my $dest = sockaddr_in (7219, inet_aton('localhost'));
connect (SH, $dest) || die $!;
select (FH);
print "test!";
exit;
this is the code for the server:
#!/usr/bin/perl
use Socket;
use CGI;
$query = new CGI;
print $query->header;
print $query->start_html(-title=>'Send
SMS!',-link=>'#1d338b',-vlink=>'#7133e3',-alink=>'ff0000');
print '<p><font size="2" face="Verdana,Arial">';
my $proto = getprotobyname('tcp');
socket(FH, PF_INET, SOCK_STREAM, $proto) || die $!;
my $sin = sockaddr_in (7219, INADDR_ANY);
bind (FH, $sin) || die $!;
listen (FH, $length);
print "connection enabled... on port:",sockaddr_in;
accept (NEW, FH);
exit;
nothing is happening... tested locally on nt4server/iis3 and online on
unix/apache server....
can someone help?
------------------------------
Date: Wed, 15 Dec 1999 14:55:08 -0600
From: "Tim Bornholtz" <tbornhol@prioritytech.com>
Subject: Re: Client/Server and Perl
Message-Id: <B984E6AA477D9E49.81FB2F7DDA49F8E4.DAFCAF090A52FC7C@lp.airnews.net>
Thomas Åhlen <thomas2@dalnet.se> wrote in message
news:836smj$d3p$1@gordon.dalnet.se...
> I wonder if someone has done this or if it could be possible.
>
> If i write a simple client and server in perl. In the communication
> between the client and server could it be possible to send entire perl
> objects.
>
Yep, look at the Data::Dumper module.
hth,
Tim Bornholtz
tbornhol@prioritytech.com
------------------------------
Date: Thu, 16 Dec 1999 03:25:56 GMT
From: hardpack <hardpack@my-deja.com>
Subject: clobbering of hashes
Message-Id: <839m41$4lk$1@nnrp1.deja.com>
i'm doing a nested iteration over a hash ref:
foreach (keys %$hash_ref) {
my ($key, $value) = ($_, $hash_ref->{$_});
foreach (keys %$hash_ref) {
my ($int_key, $int_value) = ($_, $hash_ref->{$_});
}
}
and for the second time around the outer loop, my $hash_ref
just gets destroyed. what is causing this? thanks.
-
http://www.unsucky.org/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Dec 1999 17:45:54 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: clobbering of hashes
Message-Id: <83b8gi$gg1$1@lublin.zrz.tu-berlin.de>
hardpack <hardpack@my-deja.com> wrote in comp.lang.perl.misc:
>
>
>i'm doing a nested iteration over a hash ref:
>
>foreach (keys %$hash_ref) {
> my ($key, $value) = ($_, $hash_ref->{$_});
>
> foreach (keys %$hash_ref) {
> my ($int_key, $int_value) = ($_, $hash_ref->{$_});
> }
>
>}
>
>and for the second time around the outer loop, my $hash_ref
>just gets destroyed. what is causing this? thanks.
No idea, it works fine for me. One of the loops could probably
be better written using each.
Anno
------------------------------
Date: 16 Dec 1999 18:52:11 GMT
From: lee.lindley@bigfoot.com
Subject: Re: clobbering of hashes
Message-Id: <83bccr$rk6$1@rguxd.viasystems.com>
hardpack <hardpack@my-deja.com> wrote:
:>i'm doing a nested iteration over a hash ref:
:>foreach (keys %$hash_ref) {
:> my ($key, $value) = ($_, $hash_ref->{$_});
:> foreach (keys %$hash_ref) {
:> my ($int_key, $int_value) = ($_, $hash_ref->{$_});
:> }
:>}
:>and for the second time around the outer loop, my $hash_ref
:>just gets destroyed. what is causing this? thanks.
Do you mean that $hash_ref is undefined? I find that unlikely.
Do you mean that keys stops returning values?
I can't see why you want to do what you are doing. But a likely
source of your problem is that there is only one iterator
for the hash. So build a list of the keys and iterate over the
list instead so that you only trying to use one iterator at a time:
my @keys = keys %$hash_ref;
foreach my $key (@keys) {
# -or-
#foreach my $key (@{ [keys %$hash_ref] }) {
my $value = $hash_ref->{$_};
while ( my ($int_key, $int_value) = each %$hash_ref ) {
# whatever you were going to do
}
}
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: 17 Dec 1999 10:57:47 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: clobbering of hashes
Message-Id: <83d4vb$hr9$1@lublin.zrz.tu-berlin.de>
<lee.lindley@bigfoot.com> wrote in comp.lang.perl.misc:
>hardpack <hardpack@my-deja.com> wrote:
>
>
>:>i'm doing a nested iteration over a hash ref:
>
>:>foreach (keys %$hash_ref) {
>:> my ($key, $value) = ($_, $hash_ref->{$_});
>
>:> foreach (keys %$hash_ref) {
>:> my ($int_key, $int_value) = ($_, $hash_ref->{$_});
>:> }
>
>:>}
>
>:>and for the second time around the outer loop, my $hash_ref
>:>just gets destroyed. what is causing this? thanks.
>
>Do you mean that $hash_ref is undefined? I find that unlikely.
>Do you mean that keys stops returning values?
>
>I can't see why you want to do what you are doing.
Well, when you have to combine each hash entry with each other
a loop structure like this is quite natural.
> But a likely
>source of your problem is that there is only one iterator
>for the hash. So build a list of the keys and iterate over the
>list instead so that you only trying to use one iterator at a time:
I don't think that's the problem. "keys" constructs an independent
list[1] of the hash keys, and any iterator involved would be
connected with that (anonymous) list, not the hash.
The "each" operator is a different matter. Here we have indeed a
per-hash iterator, and a loop like
while ( ($key, $value ) = each %hash ) {
while ( ( $inner_key, $inner_value ) = each %hash ) {
...
loops endlessly. Experimentation shows that even a call to
"keys" resets the "each" iterator, so that a loop that combines
"keys" and "each" must use the more stable "keys" for the outer
loop:
foreach (keys %$hash_ref) {
while ( my ( $inner_key, $inner_value ) = each %$hash_ref ) {
Swapping those lines leads again to an endless loop.
Anno
[1] Or it used to. This has been a frequent gripe with the keys
operator, especially for hashes tied to a database where the list
of keys can be long. Remedy has frequently been announced, but
I'm not entirely sure about the present status. In any case,
the semantics of an independent list of keys would have to be
preserved.
------------------------------
Date: 17 Dec 1999 16:27:45 GMT
From: lee.lindley@bigfoot.com
Subject: Re: clobbering of hashes
Message-Id: <83doa1$ijt$1@rguxd.viasystems.com>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
:> <lee.lindley@bigfoot.com> wrote in comp.lang.perl.misc:
:>> But a likely
:>>source of your problem is that there is only one iterator
:>>for the hash. So build a list of the keys and iterate over the
:>>list instead so that you only trying to use one iterator at a time:
:>I don't think that's the problem. "keys" constructs an independent
:>list[1] of the hash keys, and any iterator involved would be
:>connected with that (anonymous) list, not the hash.
Does it? I was working under the misconception that
foreach (keys %hash)
had been optimized so that it did not create the intermediate list.
I don't know why I thought that. Oh. I see from your footnote that
you are fuzzy on that as well.
:>[1] Or it used to. This has been a frequent gripe with the keys
:>operator, especially for hashes tied to a database where the list
:>of keys can be long. Remedy has frequently been announced, but
:>I'm not entirely sure about the present status. In any case,
:>the semantics of an independent list of keys would have to be
:>preserved.
Let's see.
#!/usr/lib/lprgs/perl -w
use strict;
use Tie::Hash;
package Tie::Example;
use vars qw(@ISA);
@ISA = qw(Tie::StdHash);
sub FIRSTKEY {
my $self = shift;
my $a = keys %$self; # reset
return NEXTKEY($self);
}
sub NEXTKEY {
my $self = shift;
my $key = each %$self;
print "NEXTKEY: returning $key\n" if defined $key;
return $key;
}
package main;
my %hash;
tie %hash, 'Tie::Example';
%hash = (
key1 => 'value1',
key2 => 'value2',
key3 => 'value3',
);
for my $key (keys %hash) {
print "In loop: $key\n";
}
__END__
NEXTKEY: returning key1
NEXTKEY: returning key2
NEXTKEY: returning key3
In loop: key1
In loop: key2
In loop: key3
Well, I guess we can conclude that there is no magic in the for loop
for a tied hash; the list gets built and then is used.
I can't think of a way to prove that there is not an
optimization for a builtin hash. I suppose there could be.
I was not able to find anything in the documentation to explain
why I thought that there was such an optimization.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: Thu, 16 Dec 1999 19:33:41 -0600
From: "Asquith" <asquith@macconnect.com>
Subject: Comparing Hashes
Message-Id: <83c3tm0i8@enews4.newsguy.com>
I am looking for an elegant and hopefully already existing module to compare
ALL the keys between two infinitely 'deep' hashes full off other hashes,
arrays, and scalars. I do not need to test whether the hashes are
identical, but need to test whether there are any differences in the keys.
Hash 1
{ -onekey =>
-twokey =>
-another => { -more => { -evenmore =>
}
}
-again => [ ]
}
Hash 2
{ -onekey =>
-twokey =>
-another => { -MORE => { -evenmore =>
}
}
-again => [ ]
}
So for my example the difference between the two hashes is that 'more' is
different. I do not care what the values are.
Any previous works by others would be really appreciated.
William
------------------------------
Date: 17 Dec 1999 15:51:28 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Comparing Hashes
Message-Id: <83dm60$icf$1@lublin.zrz.tu-berlin.de>
Asquith <asquith@macconnect.com> wrote in comp.lang.perl.misc:
>I am looking for an elegant and hopefully already existing module to compare
>ALL the keys between two infinitely 'deep' hashes full off other hashes,
>arrays, and scalars. I do not need to test whether the hashes are
>identical, but need to test whether there are any differences in the keys.
>
>Hash 1
>{ -onekey =>
> -twokey =>
> -another => { -more => { -evenmore =>
> }
> }
> -again => [ ]
>}
>
>Hash 2
>{ -onekey =>
> -twokey =>
> -another => { -MORE => { -evenmore =>
> }
> }
> -again => [ ]
>}
>
>So for my example the difference between the two hashes is that 'more' is
>different. I do not care what the values are.
>
>Any previous works by others would be really appreciated.
>William
That looks too specialized for a pre-fab module. Example code for
a deep copy will take you half the way, though. There's at least
Randal's example available online (I think).
Anno
------------------------------
Date: Thu, 16 Dec 1999 18:25:46 +0800
From: Wilson Tam <wiltam@singnet.com.sg>
Subject: Compile perl program under Linux
Message-Id: <3858BE2A.6B5E6561@singnet.com.sg>
Hi,
Can I compile perl program (a.pl) to native executable file under Linux.
I have try perlcc but it comes out with some messages like,
% perlcc a.pl
--------------------------------------------------------------------------------
Compiling a.pl:
--------------------------------------------------------------------------------
Making C(a.pl.c) for a.pl!
perl -I/usr/lib/perl5/5.00502/i386-linux-thread -I/usr/lib/perl5/5.00502
-I/usr/lib/perl5/site_perl/5.005/i386-linux-thread
-I/usr/lib/perl5/site_perl/5.005 -I.
-MO=CC,-oa.pl.c a.pl
a.pl syntax OK
No definition for sub Getopt::Long::GetOptions
No definition for sub Getopt::Long::GetOptions (unable to autoload)
substcont: op = LOGOP (0x80d5350) pp_substcont, pmop = PMOP (0x80d5200)
pp_subst
pmopsym = (OP*)&pmop_list[11]
substcont: op = LOGOP (0x812ca30) pp_substcont, pmop = PMOP (0x812ca70)
pp_subst
pmopsym = (OP*)&pmop_list[12]
substcont: op = LOGOP (0x812ccf8) pp_substcont, pmop = PMOP (0x812cd30)
pp_subst
pmopsym = (OP*)&pmop_list[13]
No definition for sub Socket::SO_DONTROUTE
No definition for sub Socket::SO_DONTROUTE (unable to autoload)
No definition for sub Socket::SO_RCVTIMEO
No definition for sub Socket::SO_RCVTIMEO (unable to autoload)
No definition for sub Socket::AF_UNSPEC
...
...
and a lot of (unable to autoload) error follow. In my a.pl, I have used
Getopt::Long and IO::Socket.... I wonder if I did missing out something?
please help!!
Wilson
------------------------------
Date: Thu, 16 Dec 1999 14:32:13 +0200
From: "chen" <chen@slangsoft.com>
Subject: Re: Compile perl program under Linux
Message-Id: <3858e07c.0@news.barak.net.il>
Wilson Tam <wiltam@singnet.com.sg> wrote in message
news:3858BE2A.6B5E6561@singnet.com.sg...
> Hi,
>
> Can I compile perl program (a.pl) to native executable file under Linux.
> I have try perlcc but it comes out with some messages like,
The perl compiler is still not in a working condition. Try installing the
latest perl, and if it still doesn't work, search Deja news for patches.
Just a reminder that perl compiled programs are usually no more efficient
that uncompiled.
If you are after real efficiency - try rewriting in C (*shudder*)
Enjoy!
Chen.
------------------------------
Date: Thu, 16 Dec 1999 15:39:16 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Compile perl program under Linux
Message-Id: <38597824.12F8C4C9@mail.cor.epa.gov>
Wilson Tam wrote:
>
> Hi,
Howdy,
> Can I compile perl program (a.pl) to native executable file under Linux.
> I have try perlcc but it comes out with some messages like,
Are you sure you really want to do this? You may want to read
what the FAQ has to say about this:
perldoc -q compile
Most people who want an executable want it for the wrong reasons.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 17 Dec 1999 12:12:40 +0800
From: Wilson Tam <wiltam@singnet.com.sg>
Subject: Re: Compile perl program under Linux
Message-Id: <3859B838.62B74829@singnet.com.sg>
Thanks for your reply...
Actually, I need to distribute my program to my client and I don't want
them to see the source code. Other than compile, any other hints?
thanks...
David Cassell wrote:
>
> Wilson Tam wrote:
> >
> > Hi,
>
> Howdy,
>
> > Can I compile perl program (a.pl) to native executable file under Linux.
> > I have try perlcc but it comes out with some messages like,
>
> Are you sure you really want to do this? You may want to read
> what the FAQ has to say about this:
>
> perldoc -q compile
>
> Most people who want an executable want it for the wrong reasons.
>
> David
> --
> David Cassell, OAO cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician
------------------------------
Date: 17 Dec 1999 01:10:22 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Compile perl program under Linux
Message-Id: <slrn85jott.66n.abigail@alexandra.delanet.com>
Wilson Tam (wiltam@singnet.com.sg) wrote on MMCCXCIX September MCMXCIII
in <URL:news:3859B838.62B74829@singnet.com.sg>:
__
__ Actually, I need to distribute my program to my client and I don't want
__ them to see the source code. Other than compile, any other hints?
A high energy laser. Tell them the source code is inside, and they
just have to look through the hole, and flip the switch. Perhaps you
need to add some sound effects as well, as they could install Jaws or
something similar.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 18 Dec 1999 09:21:35 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Compile perl program under Linux
Message-Id: <slrn85mkgv.hkq.simon@othersideofthe.earth.li>
Wilson Tam (comp.lang.perl.misc):
>Actually, I need to distribute my program to my client and I don't want
>them to see the source code. Other than compile, any other hints?
perldoc -q hide
Perl came to you free and open, and yet you can't contemplate giving
back. What does this make you?
--
COBOL is for morons.
-- E.W. Dijkstra
------------------------------
Date: 18 Dec 1999 20:22:56 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Compile perl program under Linux
Message-Id: <83gqf0$jlq$1@news.NERO.NET>
In article <slrn85mkgv.hkq.simon@othersideofthe.earth.li>,
Simon Cozens <simon@brecon.co.uk> wrote:
>Perl came to you free and open, and yet you can't contemplate giving
>back. What does this make you?
A perl programmer who needs to protect one piece of code who may very
well give back more than you do in ways you don't know about. How does
needing to protect one piece of code imply that he cannot contemplate
"giving back"?
Perl came to you free and open, and yet you can't contemplate letting
someone use it in a way you don't like. What does that make you?
Can we dispose of this "those who need more protection for some code
than the little that licensing give them are evil evil evil" idea
sometime soon?
------------------------------
Date: Fri, 17 Dec 1999 11:23:55 GMT
From: preetham@rocketmail.com
Subject: concurrent GET requests
Message-Id: <83d6ga$hqr$1@nnrp1.deja.com>
I want to concurrently issue HTTP GET (say about 50) without
waiting for resonse . LWP Parallel UA makes me wait for all of the
requests I registered to be completed.
for ex:
My process would request for a GET and keep doing other work
(which may be issuing further requests) and I want to process the data
i receive from previous GET request when I receive it (making the whole
thing asynchronous) and I don't want to fork as it makes the process
heavy.
Can someone guide me,
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 17 Dec 1999 10:01:52 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: concurrent GET requests
Message-Id: <brian-1712991002400001@rtp-cr45-dhcp-167.cisco.com>
In article <83d6ga$hqr$1@nnrp1.deja.com>, preetham@rocketmail.com wrote:
> I want to concurrently issue HTTP GET (say about 50) without
>waiting for resonse . LWP Parallel UA makes me wait for all of the
>requests I registered to be completed.
use an external process to perform the network transactions. read
from a pipe to that process as data arrives.
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: 17 Dec 1999 12:07:00 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: concurrent GET requests
Message-Id: <x71z8la43v.fsf@home.sysarch.com>
>>>>> "p" == preetham <preetham@rocketmail.com> writes:
p> I want to concurrently issue HTTP GET (say about 50) without
p> waiting for resonse . LWP Parallel UA makes me wait for all of the
p> requests I registered to be completed.
no it shouldn't. that is the whole reason for it. you might be using it
wrong. i have successfully done a parallel request meta search engine
with it. perhaps you should post your code as show where you think it is
blocking and not doing parallel operations. one issue may be the connect
itself could block but the wait for a response is definitely
asynchronous. and the new version of LWPng is supposed to be much better
at this but i haven't tried it yet.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Fri, 17 Dec 1999 13:35:50 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: concurrent GET requests
Message-Id: <brian-1712991336380001@rtp-cr45-dhcp-167.cisco.com>
In article <x71z8la43v.fsf@home.sysarch.com>, Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "p" == preetham <preetham@rocketmail.com> writes:
> p> I want to concurrently issue HTTP GET (say about 50) without
> p> waiting for resonse . LWP Parallel UA makes me wait for all of the
> p> requests I registered to be completed.
>
>no it shouldn't. that is the whole reason for it. you might be using it
>wrong. i have successfully done a parallel request meta search engine
>with it. perhaps you should post your code as show where you think it is
>blocking and not doing parallel operations.
i think he was saying that it was operating in parallel just fine, but
he couldn't go onto the next step in the program until the last
URL had been checked, which is different than what you seem to be saying.
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: 17 Dec 1999 13:58:18 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: concurrent GET requests
Message-Id: <x7puw58kdx.fsf@home.sysarch.com>
>>>>> "bdf" == brian d foy <brian@smithrenaud.com> writes:
>>>>>>> "p" == preetham <preetham@rocketmail.com> writes:
p> I want to concurrently issue HTTP GET (say about 50) without
p> waiting for resonse . LWP Parallel UA makes me wait for all of the
p> requests I registered to be completed.
bdf> i think he was saying that it was operating in parallel just fine, but
bdf> he couldn't go onto the next step in the program until the last
bdf> URL had been checked, which is different than what you seem to be saying.
if he is doing the wait for all to complete route, you are right. i
would use the callback interface so i could process pages as they get
it. i sorta assumed that. als you can stop the whole process from a
callback if you desire, with the wait you are stuck until the slowest
one gets done or times out.
callbacks are good. learn them.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
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 1669
**************************************