[21994] in Perl-Users-Digest
Perl-Users Digest, Issue: 4216 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 4 18:07:03 2002
Date: Wed, 4 Dec 2002 15: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)
Perl-Users Digest Wed, 4 Dec 2002 Volume: 10 Number: 4216
Today's topics:
Re: child signal ctcgag@hotmail.com
Re: child signal <lshaw-usenet@austin.rr.com>
Re: child signal <lshaw-usenet@austin.rr.com>
Re: cron and argv (woodywit)
Re: cron and argv <ddunham@redwood.taos.com>
Re: forking server and autoflush? <lshaw-usenet@austin.rr.com>
Re: forking server and autoflush? <astone@i.net>
Re: Future of Perl as an application server language? (Simon)
Re: Future of Perl as an application server language? <uri@stemsystems.com>
Re: Getting a URL Page <twhu@lucent.com>
Re: Getting a URL Page <nobull@mail.com>
Re: Getting a URL Page <wsegrave@mindspring.com>
Re: Getting a URL Page <wsegrave@mindspring.com>
Re: Getting a URL Page <pkrupa@redwood.rsc.raytheon.com>
Re: help with Can't modify constant item in scalar assi <mothra@nowhereatall.com>
Re: Newbie: Translation from PHP to Perl <flavell@mail.cern.ch>
Re: passing data between perl scripts and a module: pro (benrog)
Re: perl 5.8 problem <goldbb2@earthlink.net>
Re: Perl Question (Tad McClellan)
Re: Quick syntax question... <family2@aracnet.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 04 Dec 2002 20:33:21 GMT
From: ctcgag@hotmail.com
Subject: Re: child signal
Message-Id: <20021204153321.727$8w@newsreader.com>
Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> wrote:
>
> A related question:
>
> I want to fork a number of children but I want to ensure that no more
> than 10 processes operate at once.
Use Parallel:ForkManager
> I've tried incrementing a counter
> when forking the child and then using the zombie() routine to decrement
> it, but it appears that if two children finish at the same time the
> routine is only called once.
I think the problem is that the the SIG routine won't interrupt itself,
so any CHLD received while perl is already in one zombie routine gets
ignored.
This can be greatly improved by doing:
sub zombie
{
while (1) {
my $kid = waitpid(-1,&WNOHANG);
return if $kid<1;
print "$kid Waited on\n";
}
};
But still, some CHLD will leak through.
> Is there a way to ensure a guaranteed signal for every child?
Not that I know of.
I think the only truly safe was is not to use the CHLD signal, but rather
to spin a loop around waitpid.
Use Parallel::ForkManager
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
------------------------------
Date: Wed, 04 Dec 2002 22:40:58 GMT
From: Logan Shaw <lshaw-usenet@austin.rr.com>
Subject: Re: child signal
Message-Id: <_vvH9.118157$8D.3069049@twister.austin.rr.com>
In article <20021204110230.165$Sn@newsreader.com>, ctcgag@hotmail.com wrote:
> By sending the negative signal, it gets sent to the whole "process
> group". As far as I can tell, a "process group" consists of a process and
> all of it's decendents. So here, the parent process kills itself and all
> of it's children.
I'm not an expert on process groups, but I don't think this is what
a process group is. I am pretty sure (but not absolutely positive)
that a process is always a member of exactly one process group.
Unless all processes are children of the same parent, that contradicts
your idea. Imagine the relationship of processes depicted by this
tree (where A is the parent of B, etc.):
A
/ \
B E
/ \
C D
By your definition, A would be a member of the same process group
as B, which would consist of A, B, C, D, and E. But, B would have
to be a member of the same process group as C; that process group
would consist of B, C, and D. Those two process groups would have
to be the same, but they're not.
To put it in more practical terms, if you use that definition to
try to kill B, C, and D, you're going to mistakenly kill A and E
as well.
A modified definition, which I think is pretty accurate, is that
a "process group" consists of a process and all its descendents,
except for those descendants which have used setpgrp() (or similar)
to join or create another process group. (Could a process group
also consist of processes that have explicitly joined it by doing
setpgrp(), even though they're not its descendant?)
So anyway, I think you could accomplish the goal by using setpgrp()
to start a new process group, but even so there are portability
issues with signalling entire process gropus, and it's a lot simpler
IMHO to just keep a list of all children fork()ed.
- Logan
--
I'm currently looking for work as a Unix/Solaris
administrator, or Perl/C++/Java developer. Resume
at http://home.austin.rr.com/logan/resume.html.
------------------------------
Date: Wed, 04 Dec 2002 21:27:30 GMT
From: Logan Shaw <lshaw-usenet@austin.rr.com>
Subject: Re: child signal
Message-Id: <6ruH9.99618$Gc.2916551@twister.austin.rr.com>
In article <9cb0a59f4b.spamhater@keepyourfilthyspamtoyourself.co.uk>, Alan Wrigley wrote:
> I want to fork a number of children but I want to ensure that no more
> than 10 processes operate at once. I've tried incrementing a counter
> when forking the child and then using the zombie() routine to decrement
> it, but it appears that if two children finish at the same time the
> routine is only called once.
>
> Is there a way to ensure a guaranteed signal for every child?
Now you know why signals are bad. :-)
Instead, use wait() and fork() inside a loop, fork()ing when you
need to start a new child, and wait()ing when you don't. Here's
an example that goes on the assumption that you have a fixed list
of tasks, and you want each child to process one task:
sub run_tasks_in_children ()
{
my ($max_children, @tasks) = @_;
my $children = 0;
# stick around as long as there are children left to wait for
# or tasks to be given to children.
while (@tasks > 0 or $children > 0)
{
# we might want to start a child, but only if we don't
# already have enough, and only if there is work
# for it to do.
if ($children < $max_children and @tasks > 0)
{
start_child (shift @task); # does the fork(), etc.
$children++;
}
# It's always safe to wait here, because we're always
# guaranteed we have a child here: if we had no children
# and no tasks, we would have exited the while loop.
# if we had only tasks and no children, the above "if"
# statement would have started a child.
wait();
$children--;
}
}
I personally find that when I do something like this, it's best to
add some error checking. I'd approach this by having a hash that
maps child process IDs to tasks (values that were originally in
@task). You get the process ID back from wait(), so you can use
it to find out what task the child was working on.
You can then use some method (check an external file, check $?
after wait(), etc.) to determine whether a child succeeded or not.
If you need to re-process a task, it'll work perfectly well to just
add that task back to @tasks right after the wait() call.
Also, there are a few modules on CPAN that could help you with this
(Parallel::ForkManager and Proc::Queue), but as far as I can tell,
all they do is basically provide you with a wrapper around fork()
that happens to block if there are too many children. IMHO, it's
easier to write clear code if you just need to define a start_child()
function to use with the code above rather than write a whole loop.
- Logan
--
I'm currently looking for work as a Unix/Solaris
administrator, or Perl/C++/Java developer. Resume
at http://home.austin.rr.com/logan/resume.html.
------------------------------
Date: 4 Dec 2002 14:20:59 -0800
From: markwitczak@yahoo.com (woodywit)
Subject: Re: cron and argv
Message-Id: <88c9f169.0212041420.6f1fb195@posting.google.com>
markwitczak@yahoo.com (woodywit) wrote in message news:<88c9f169.0212021501.272a0b7d@posting.google.com>...
> I'm having a problem with reading $ARGV[0] in a perl script that is
> executed by cron. Any solutions?
>
> Here is the script AppCamDriver.pl:
>
> #!/usr/local/bin/perl -w
> use strict;
> my $martName = $ARGV[0];
> print $martName,"\n";
>
> The cron entry looks like this:
> 01 15 * * * csh -c \$CONIHOME/scripts/AppCamDriver.pl ALL
My bad for not providing the complete picture of the problem.
1. There is no output given by the print statement because perl sees
$ARGV[0] as being empty.
If I modify the script to this:
#!/usr/local/bin/perl -w
use strict;
my $martName = $ARGV[0];
print "Current mart is $martName running.\n";
The mail message from cron looks like this:
Your "cron" job on server10
csh -c \$CONIHOME/scripts/AppCamDriver.pl ALL
produced the following output:
Use of uninitialized value
at /coni/users/test/sams/data2/prod/scripts/AppCamDriver.pl line 4.
Current mart is running.
Note that $HOME is /coni/users/test and $CONIHOME is $HOME/sams/data2/prod
2. The reason the cron job invokes csh with the -c flag is because $CONIHOME is
defined in a .cshrc file. Our production environment is csh. As you
already know cron uses sh as the default shell.
The backslash in front of $CONIHOME IS required for it to be expanded.
3. According to the man page for csh -c:
Execute the first argument. Remaining arguments are placed in argv,
the argument-list variable, and passed directly to csh.
So if the argument "ALL" is placed in argv, why doesn't perl read it
correctly? That is the main issue I'm facing.
Thanks
Mark
------------------------------
Date: Wed, 04 Dec 2002 22:32:20 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: cron and argv
Message-Id: <UnvH9.2464$UW6.44949708@newssvr13.news.prodigy.com>
woodywit <markwitczak@yahoo.com> wrote:
> markwitczak@yahoo.com (woodywit) wrote in message news:<88c9f169.0212021501.272a0b7d@posting.google.com>...
>> I'm having a problem with reading $ARGV[0] in a perl script that is
>> executed by cron. Any solutions?
>
> 3. According to the man page for csh -c:
> Execute the first argument. Remaining arguments are placed in argv,
> the argument-list variable, and passed directly to csh.
> So if the argument "ALL" is placed in argv, why doesn't perl read it
> correctly? That is the main issue I'm facing.
Because -c only reads one argument. In your case that's the perl
executable. It *doesn't* pass all remaining arguments to the executed
program. They're still available to the csh program.
# csh -c /tmp/perl foo
name ->/tmp/perl<-
Use of uninitialized value at /tmp/perl line 5.
first arg -><-
# csh -c "/tmp/perl foo"
name ->/tmp/perl<-
first arg ->foo<-
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
------------------------------
Date: Wed, 04 Dec 2002 21:33:26 GMT
From: Logan Shaw <lshaw-usenet@austin.rr.com>
Subject: Re: forking server and autoflush?
Message-Id: <GwuH9.99620$Gc.2916551@twister.austin.rr.com>
In article <MPG.18581391bc8ad463989725@news.pandora.be>, astone wrote:
> As a fairly new perl programmer, i'm working on a small application
> which includes a forking server. But i'm having a little problem.
> When i log to the server with a single telnet session, all works
> great, whatever i type gets echoed by the server after a carriage
> return. However, when i log in with a second client at the same time,
> that second client doesn't act like the first one did
Have you considered using Net::Server::Fork from CPAN?
See http://search.cpan.org/author/RHANDOM/Net-Server-0.84/ .
It's a nice learning exercise to do it yourself, but it's also nice
to not have to reinvent the wheel.
- Logan
--
I'm currently looking for work as a Unix/Solaris
administrator, or Perl/C++/Java developer. Resume
at http://home.austin.rr.com/logan/resume.html.
------------------------------
Date: Wed, 04 Dec 2002 22:06:41 GMT
From: astone <astone@i.net>
Subject: Re: forking server and autoflush?
Message-Id: <MPG.18589a8b2d6e0ed3989727@news.pandora.be>
In article <GwuH9.99620$Gc.2916551@twister.austin.rr.com>, lshaw-
usenet@austin.rr.com says...
> In article <MPG.18581391bc8ad463989725@news.pandora.be>, astone wrote:
> > As a fairly new perl programmer, i'm working on a small application
> > which includes a forking server. But i'm having a little problem.
> > When i log to the server with a single telnet session, all works
> > great, whatever i type gets echoed by the server after a carriage
> > return. However, when i log in with a second client at the same time,
> > that second client doesn't act like the first one did
>
> Have you considered using Net::Server::Fork from CPAN?
>
> See http://search.cpan.org/author/RHANDOM/Net-Server-0.84/ .
>
> It's a nice learning exercise to do it yourself, but it's also nice
> to not have to reinvent the wheel.
No i haven't actually considered that, since i'm pretty new to perl
(only just finished O'Reilly's Learning Perl), i'm not all that familiar
(yet) with cpan etc.
Anyway, in the mean time, i figured out that is was a bug (or a
feature?) in activeperl, since i don't have that problem when
running the program on my slackware box.
Still, thanks for your advice, i'm gonna give that a closer look.
regards,
dk
------------------------------
Date: 4 Dec 2002 11:32:53 -0800
From: simonf@simonf.com (Simon)
Subject: Re: Future of Perl as an application server language?
Message-Id: <3226c4d3.0212041132.538947eb@posting.google.com>
Hi pkent,
pkent <pkent77tea@yahoo.com.tea> wrote in message news:<pkent77tea-31181F.21340303122002@news-text.blueyonder.co.uk>...
> In article <3226c4d3.0212030947.556f7ed1@posting.google.com>,
> simonf@simonf.com (Simon) wrote:
>
> ^^^^^^
> Not the simonf from my very own office, I guess.
No, I am Simon also known as Vsevolod Ilyushchenko. (Google does not
let me to change the name for some reason.)
>
> > I have recently went to the Software Development Conference/Expo in
> > Boston and was faced with the fact that Java seems to be the language
> > of choice for serious web applications.
>
> Not where I'm from, it isn't. Having 2 friends who used to organize
> conferences[1] I do think that the agenda and bias of any conference can
> be significantly skewed. A major factor is just how much the organizer
> cares, or how tired they are. Not that all conferences are, but always
> take a pinch of salt with you.
True - seeing that all the talks are about Java or C#, the Perl people
might not go. On the other hand, I looked at the program of the latest
O'Reilly Perl conference, and the emphasis was much more on the
language and the libraries rather than higher-level design concepts.
> > I am developing intranet applications in Perl, borrowing and writing
> > code that slowly becomes an application server framework. I am sure
> > lots of people do the same thing in Perl. However, I think the lack of
> > standards is killing us.
>
> Not where I'm from. To be fair, the phrases you use are not
> well-defined[2] to me...
See - another example of terminology not quite established in the Perl
world. No Java programmer will question what "application server"
means - they are long used to its commong meaning of "second-tier
software framework".
> I'd be interested in some concrete examples of
> what you're doing and what problems you face.
Object-relational persistence, of course. There are several tools
listed at
http://poop.sourceforge.net/ , but compare this to the number of
similar Java tools: http://c2.com/cgi-bin/wiki?ObjectRelationalToolComparison
. I may be contradicting myself, because more tools means fewer
standards, but in this case, I think, the number of tools corresponds
to the popularity of a concept. There are commercial Java OORDB tools
out there, but no commercial Perl tools.
This is an area where it's impossible to have one common standard
anyway.
More interesting is the question of web-object persistence. When the
CGI parameters are received, some of them must be ignored, some should
be accepted to override the values in the database, but some other may
only be used for creation, not updating. Plus, the set of accepted
parameters can vary depending on which user is logged in. Plus, I may
need to create more than one object from a single CGI hash. I have not
seen a decent abstraction layer for this at all.
Security deserves its own abstraction. The latest servlet API spec
talks about servlet filters, which are a great way to separate various
processing layers. Nothing comparable in Perl.
Operation dispatch - how to invoke different methods in different
classes based on the CGI parameters. Currently I am using parameters
called 'isa' and 'op', but what if I need to specify more than one
operation? Nothing fancy here, and a lot of applications do this
already, but different people use different parameter names.
I am not even going to mention thread safety issues, transactions,
handling JARs and their dependencies, where Java is way ahead.
I have picked up on this just from the few days of the conference, as
I did not know much about server-side Java before (and I will get into
it now). I am sure someone more familiar with various Java tools will
be able to give many more examples.
> I would love to hazard a guess that the problems you're finding as
> systems grow and need to integrate are problems that would occur in any
> programming language. They're problems at a high level of abstraction,
> the language doesn't matter.
Of course not. But the frameworks do matter, and IMHO Perl frameworks
are lacking.
> *snigger* _bad_ java programmers will put configuration files in stupid
> places. Good ones won't. Repeat for every programming language under the
> sun. A file location is a file location, a concept independent of any
> programming language. Please don't imagine that using language A rather
> than B will make people magically put files in the right place (I say
> files to contrast with items inside, say, a .jar file)
Whoa - I am not attacking Perl!!! I am simply comparing the
availability of tools for Java and Perl. I will leave the question of
how and whether this follows from the differences between languages to
computer philosophers.
Perhaps this is a wrong group to bring up these issues. I will
appreciate suggestions for a more appropriate forum.
> There's only one database interface that you generally need, the perl
> DBI. AFAIK some weird databases did, or do, have other modules, like
> Sybase or Informix, but that could be ages ago, or down to fundamental
> technical differences. Only a perl programmer with a lot of free time
> would reimplement the Oracle interface, for example. So I would disagree
> with your inplication that people keep writing DB modules.
Err... of course I use DBI. However, pretty much everybody agreed at
the conference that having raw SQL in your code is bad design. It may
be fine for a two-page script, but is unacceptable in an enterprise
application. A good persistence layer is a must. IMHO omitted
deliberately.
> I have no idea what MVC patterns are, though. If there are 14
> implementations on CPAN we can probably construe that as excess coverage
> of the problem domain :-)
Model-View-Controller. Very roughly, Controller is the object
processing requests (servlet proper), Model is the data, View is the
HTML form. I am sure that there are 1400 implementations of this
pattern out there, but this is a place where standards really would
help, as this describes pretty much any web application. Otherwise, if
you take over someone else's code, you will have to figure out his/her
ideas about the implementation of this pattern.
> > Do you know that coarse-grained session beans give you better
> > performance than any kind of entity beans, even with caching? This is
> <snip>
> Well I'll snip all this as it deals with software engineering concepts
> not specific to any programming language. The jargon may well be
> specific to a certain language, but that's like saying:
>
> "Python doesn't have hashes! It's crap! And perl doesn't have
> associative arrays, so it's also crap! And C++ doesn't have dictionaries
> so it's also crap!"
Assembly language does not have hashes, so it's crap provided you like
to think in terms of hashes. More correctly, assembly is not the
language for certain problems. If one language has standard frameworks
supporting software engineering concepts, and another one does not,
guess which one will be more viable?
Simon
------------------------------
Date: Wed, 04 Dec 2002 19:56:32 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Future of Perl as an application server language?
Message-Id: <x765u9v9qo.fsf@mail.sysarch.com>
>>>>> "S" == Simon <simonf@simonf.com> writes:
S> Of course not. But the frameworks do matter, and IMHO Perl frameworks
S> are lacking.
then check out stem (stemsystems.com) which sounds like what you are
looking for. it is a distributed framework and application development
tool. it is much easier to configure and develop with than java and it
is in pure perl. it can be used as a web back end with very little
effort.
S> Err... of course I use DBI. However, pretty much everybody agreed at
S> the conference that having raw SQL in your code is bad design. It may
S> be fine for a two-page script, but is unacceptable in an enterprise
S> application. A good persistence layer is a must. IMHO omitted
S> deliberately.
and stem has a dbi module that lets you have multiple parallel dbi
connections. also the sql code is stored in the stem config files and
not in the perl code.
S> Model-View-Controller. Very roughly, Controller is the object
S> processing requests (servlet proper), Model is the data, View is the
S> HTML form. I am sure that there are 1400 implementations of this
S> pattern out there, but this is a place where standards really would
S> help, as this describes pretty much any web application. Otherwise, if
S> you take over someone else's code, you will have to figure out his/her
S> ideas about the implementation of this pattern.
MVC is just another buzzword.
stem can be viewed as a servlet type of system but it can also be viewed
in many other ways. in fact stem can be more distributed than typical
applets servers as it uses message passing and parallelism to support
scaling across multiple boxes and to multiple external processes and
servers. there are no threading issues to worry about.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Wed, 4 Dec 2002 14:07:16 -0500
From: "Tulan W. Hu" <twhu@lucent.com>
Subject: Re: Getting a URL Page
Message-Id: <asljpv$7ag@netnews.proxy.lucent.com>
"Kasp" <kasp@epatra.com> wrote in
>
> I am a newbie in Perl World and my task is to get a Web Page, given
> the URL, and store it's contents in a temp.txt file.
> Frankly, I have to do more than that...but as of now getting a web
> page is bugging me.
>
> I want to know how I can do this. Is there a module to do this? (I bet
> there is..but dont know).
http://search.cpan.org/author/GAAS/libwww-perl-5.65/
> A link or a URL (Uggh!!!) pointer will be greatly appreciated. :-)
> Thanks
------------------------------
Date: 04 Dec 2002 19:29:21 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Getting a URL Page
Message-Id: <u9n0nlvazy.fsf@wcl-l.bham.ac.uk>
kasp@epatra.com (Kasp) writes:
> I am a newbie in Perl World
See FAQ.
> and my task is to get a Web Page, given
> the URL, and store it's contents in a temp.txt file.
Yes, this is a FAQ.
> I want to know how I can do this. Is there a module to do this? (I bet
> there is..but dont know).
Yes, where have you looked?
> A link or a URL (Uggh!!!) pointer will be greatly appreciated. :-)
I point you to the FAQ. It'll be on your disk already but I can't
give you a URL to your local copy.
http://perldoc.com/perl5.8.0/pod/perlfaq.html
Pay particular attension to the appaulingly poorly worded "How do I
fetch an HTML file?" (which should, of course, really say "How do I
fetch an HTTP entity?" since it has nothing to do with HTML or files).
See also: "What modules and extensions are available for Perl? What is
CPAN? What does CPAN/src/... mean?"
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 4 Dec 2002 13:39:00 -0600
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Getting a URL Page
Message-Id: <aslloh$qt2$1@slb4.atl.mindspring.net>
"Kasp" <kasp@epatra.com> wrote in message
news:3b04990d.0212041057.5abbb2c1@posting.google.com...
> Hi!,
>
> I am a newbie in Perl World and my task is to get a Web Page, given
> the URL, and store it's contents in a temp.txt file.
> Frankly, I have to do more than that...but as of now getting a web
> page is bugging me.
>
> I want to know how I can do this. Is there a module to do this? (I bet
> there is..but dont know).
Yes. LWP::Simple.
There's a one-liner that does most of what you want on page 207 of _Learning
Perl_, 2nd. Ed.
As a Perl script, that one-liner might look something like:
#!perl -w
# ch19p207e.pl - usage perl ch19p207e.pl
target=http://rest_of_the_URL/sample.html > sample.txt
use strict;
use CGI;
use LWP::Simple;
my $query = CGI->new;
getprint $query->param('target');
Bill Segraves
------------------------------
Date: Wed, 4 Dec 2002 13:49:10 -0600
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Getting a URL Page
Message-Id: <aslmal$siq$1@slb9.atl.mindspring.net>
"William Alexander Segraves" <wsegrave@mindspring.com> wrote in message
news:aslloh$qt2$1@slb4.atl.mindspring.net...
<snip>
> #!perl -w
> # ch19p207e.pl - usage perl ch19p207e.pl
> target=http://rest_of_the_URL/sample.html > sample.txt
Fix the line wrap in the comment statement above before using it.
Bill Segraves
------------------------------
Date: Wed, 04 Dec 2002 22:22:25 +0000
From: "Peter A. Krupa" <pkrupa@redwood.rsc.raytheon.com>
Subject: Re: Getting a URL Page
Message-Id: <3DEE8021.E2AA57EB@redwood.rsc.raytheon.com>
From a DOS prompt:
perl -MLWP::Simple -e "getstore ( 'http://www.yahoo.com/', 'temp.txt' )"
If you're behind a firewall you'll have to SET environment variables for
HTTP_proxy, HTTP_proxy_user and HTTP_proxy_pass.
------------------------------
Date: Wed, 4 Dec 2002 11:31:11 -0800
From: "Mothra" <mothra@nowhereatall.com>
Subject: Re: help with Can't modify constant item in scalar assignment but it does not tell me why?
Message-Id: <3dee57d8@usenet.ugs.com>
"Jeff Zucker" <jeff@vpservices.com> wrote in message
news:3DEE4CB3.3040202@vpservices.com...
> Mothra wrote:
>
> The problem is greater than you can handle.
Yes, I relize that now :-)
>
> As in, a missing greater than character ... hash keys are assigned with
> {key => value}, not {key = value}.
>
> --
> Jeff
Thanks Jeff !
Mothra
------------------------------
Date: Wed, 4 Dec 2002 19:56:35 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Newbie: Translation from PHP to Perl
Message-Id: <Pine.LNX.4.40.0212041948550.22227-100000@lxplus074.cern.ch>
On Dec 4, Tassilo v. Parseval inscribed on the eternal scroll:
> The guy on the right, is that John von Neumann? Or wasn't he yet born by
> the time this picture was taken? ;-)
Just for the record - the "machine" was already obsolete when I met it
in 1958, it had been cast-out by Harwell and offered to an institution
who would give it a good home - Wolverhampton won the prize, see
http://www.scit.wlv.ac.uk/university/scit/history/timeline.html
------------------------------
Date: 4 Dec 2002 11:39:57 -0800
From: ben.rogers@escalate.com (benrog)
Subject: Re: passing data between perl scripts and a module: probably a basic question
Message-Id: <1da5d446.0212041139.57b1052a@posting.google.com>
Ben,
thanks for the advice. I see now how I was making a number of
mistakes. I implemented your changes. It seems I still need the "&"'s
in the bodies of the sub where I am navigating to a different sub.
I'll sum up what I've learned when the script works. . . It's
behaving much better, but I still get one error:
Use of uninitialized value in null operation at rogersbe_prj3_Hits.pm
line 58, <
STDIN> line 2.
Use of uninitialized value in null operation at rogersbe_prj3_Hits.pm
line 58, <
STDIN> line 2.
Whenever I select a menu option, it goes to the requisite subroutine
and then fails at this line: dbmopen (%DATABASE, $database, 0644);
----then the error above is generated.
Any ideas?
------------------------------
Date: Wed, 04 Dec 2002 16:53:29 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: perl 5.8 problem
Message-Id: <3DEE7959.9367F0AE@earthlink.net>
venkat wrote:
>
> Hi,
>
> I have downloaded a simple http proxy from the net and using it with
> perl 5.8. When my browser sends a request to the proxy, the proxy
> gives the following error and doesn't process the request.
> --
> socket: Invalid argument at proxy.pl line 194, <CHILD> line 1.
> --
> It used to work fine with pel 5.6. Can someone tell me what the
> problem is and suggest me a solution. The proxy code is at
>
> http://crypto.stanford.edu/~dabo/proxy/proxy.pl
The code there is perl4 code -- you were lucky that it worked ok with
perl 5.6, and just "too bad" that it doesn't work with 5.8... but you
really ought to rewrite it with the IO::Socket::INET module, rather than
the sys/socket.ph perl4-library. Oh, and make it strict and warnings
clean. Once you've done that, your problem will likely disappear.
--
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]
------------------------------
Date: Wed, 4 Dec 2002 16:04:25 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl Question
Message-Id: <slrnausuv9.4mh.tadmc@magna.augustmail.com>
[ If you want to start a new thread, then start a new thread.
Please do not put unrelated stuff in some other thread.
Please put the subject of your article in the Subject of your article.
]
Kevin Doherty <kdoherty@atmel.com> wrote:
> Simple question
A Frequently Asked Question.
> The problem I have is to
> delete a few lines.
perldoc -q delete
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 04 Dec 2002 13:05:20 -0600
From: Abernathey Family <family2@aracnet.com>
Subject: Re: Quick syntax question...
Message-Id: <3DEE51F0.17BE0990@aracnet.com>
Brian McCauley wrote:
>
> "Richard S Beckett" <spikey-wan@bigfoot.com> writes:
>
> > Subject: Re: Quick syntax question...
>
> Please put the subject of your post in the Subject of your post. If
> in doubt try this simple test. Imagine you could have been bothered
> to have done a search before you posted. Next imagine you found a
> thread with your subject line. Would you have been able to recognise
> it as the same subject?
>
> Could you really not have come up with something like:
>
--snip--
What a waste.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 4216
***************************************