[10079] in Perl-Users-Digest
Perl-Users Digest, Issue: 3672 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 9 19:08:13 1998
Date: Wed, 9 Sep 98 16:00:18 -0700
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, 9 Sep 1998 Volume: 8 Number: 3672
Today's topics:
Re: column extraction from a string <eashton@bbnplanet.com>
Re: column extraction from a string <jdporter@min.net>
Re: Detecting one character in a Form Field (Craig Berry)
Displaying record count <tlbarlet@le-ana-enterprises.com>
Re: Displaying record count (Steve Linberg)
Re: Displaying record count <tlbarlet@le-ana-enterprises.com>
Re: History of Perl - round 1 (David Adler)
learning perl......... <jamdiaz@klaskycsupo.com>
Re: learning perl......... (Steve Linberg)
Re: Off topic, but ... [Was Re: Perl & Java - differenc <strat@pacifier.com>
Opening in a windows 95 serial port with perl. <dnm1@ukc.ac.uk>
Re: Perl Data Structures: trees etc... <jhi@alpha.hut.fi>
Re: Perl Programmer Needed (Faust Gertz)
pop3 as http <flanker@sonnet.ru>
Re: Proposal: relative_time() for Time::Local module <dagon@halcyon.com>
Re: QUESTIONS (was: Perl Programmer Needed) (Nathan V. Patwardhan)
Re: QUESTIONS (was: Perl Programmer Needed) (Steve Linberg)
Re: QUESTIONS (was: Perl Programmer Needed) (David A. Black)
Re: QUESTIONS (was: Perl Programmer Needed) (Steve Linberg)
Re: QUESTIONS (was: Perl Programmer Needed) (Craig Berry)
Re2: sprintf error in Perlis and PerlScript David@iqtexas.com
Saving an Array or Hash into a $Session Variable in ASP <pan@part.net>
Use of 'exit' in child process <chris.hinds@arm.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 09 Sep 1998 21:00:02 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: column extraction from a string
Message-Id: <35F6E9F5.EAF6E66D@bbnplanet.com>
> At the moment I am going through a rather convoluted
> process to extract this 2nd column (spliting the string
> into a list and cycling through this list etc etc).
>
> Would there be a more elegant way of extracting the 2nd
> column?
Well, you could either use an intelligent regex, or, depending on how
you're using this info, etc. you could also use the command 'cut'. One
of my personal favourites. If it is not on your system you can go get
the gnu util package.
e.
------------------------------
Date: Tue, 08 Sep 1998 17:02:26 -0400
From: John Porter <jdporter@min.net>
Subject: Re: column extraction from a string
Message-Id: <35F59B62.760A6A93@min.net>
Matt Knecht wrote:
>
> John Porter <jdporter@min.net> wrote:
> >What's so convoluted about
> >
> >for ( `ps -f` ) {
> > my $pid = (split)[1];
> >}
>
> The coulmns in ps are not guarenteed to be seperated by spaces. Some
> columns aren't even guarenteed to have values. The only reliable way to
> parse ps data is by byte offset, not split on whitespace.
>
> Although, split works for a quick and dirty hack. :)
Right. He said he wanted pids. The only way my hack won't work right
is if there's whitespace in the username.
(Of course, I conveniently ignored the issue of the header line; and
the system-specific nature of the command.)
--
John Porter
------------------------------
Date: 9 Sep 1998 21:01:51 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Detecting one character in a Form Field
Message-Id: <6t6qbv$ppm$2@marina.cinenet.net>
Eric (_nospam_eric@kissco.com) wrote:
: I'm new to perl programming and I need help on 1 problem. I have a form
: field, which is a serial number($FORM{'Serial'}), and I need to detect what
: the 5th character is. It sounds simple enough, but I can't figure it out.
$fifthchar = substr($FORM{'Serial'}, 4, 1);
perldoc -f substr
Note zero-based indexing; "Nth char" is at index N-1.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 09 Sep 1998 21:13:34 GMT
From: "Terry L. Barlet" <tlbarlet@le-ana-enterprises.com>
Subject: Displaying record count
Message-Id: <2cCJ1.1067$p61.1624847@news4.mia.bellsouth.net>
Can someone point me in the right direction on how to display the number of
records in a data file. I have scripts that return a table listing states
that contain ads. when clicking on the state the script then returns a table
listing the cities in that state that contain ads(Each state has its own
data file)
What I want to accomplish is having the script insert the number of records
in the data file for the state like Florida (10). Then when Florida is
clicked have the script show how many records are in each city like Miami
(5) Tampa (2) Orlando (3)
I'm new to perl and cannot locate the info in the books I have. If anyone
can point me in the right direction or even tell me the names of the
functions or operators I am interested in.
------------------------------
Date: Wed, 09 Sep 1998 17:50:11 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Displaying record count
Message-Id: <linberg-0909981750110001@ltl1.literacy.upenn.edu>
In article <2cCJ1.1067$p61.1624847@news4.mia.bellsouth.net>, "Terry L.
Barlet" <tlbarlet@le-ana-enterprises.com> wrote:
> Can someone point me in the right direction on how to display the number of
> records in a data file.
<snip>
It would help if you gave some information about the kind of data file
you're talking about. DBI:: is probably the kind of solution you want,
but until you specify what kind of data you're working with, we're all
guessing. :)
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 09 Sep 1998 22:48:33 GMT
From: "Terry L. Barlet" <tlbarlet@le-ana-enterprises.com>
Subject: Re: Displaying record count
Message-Id: <5BDJ1.1090$p61.1680504@news4.mia.bellsouth.net>
The data files are just a text file with a " | " delimiter. Each record
begins with an ad id.
------------------------------
Date: 9 Sep 1998 22:51:04 GMT
From: dha@panix.com (David Adler)
Subject: Re: History of Perl - round 1
Message-Id: <6t70oo$k43@news1.panix.com>
On Sat, 05 Sep 1998 20:00:13 GMT, Elaine Ashton
<eashton@bbnplanet.com> wrote:
>since someone mentioned doing a history of perl i have taken an interest
>in actually doing it. a few others have also expressed an interest in
>helping research and write it sooo...the tentative thesis is 'the
>history of perl as viewed through the sociological and economic forces
>driving its development'.
>
>this may, or may not be the best approach so i'm open to ideas.
Ok, come up with a different title! Eek. Perl deserves better
(certainly more entertaining).
;-)
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
The perversity of the Universe tends towards a maximum.
------------------------------
Date: Wed, 09 Sep 1998 14:08:18 -0700
From: Jaime Diaz <jamdiaz@klaskycsupo.com>
Subject: learning perl.........
Message-Id: <35F6EE41.3ABA@klaskycsupo.com>
I am trying to learn to create some reports on a UNIX based system..I
what to take output,such as df -k and output to file...then make it
readable...
I tried using split to create fields, but the split(//): only takes one
space into account...How can I parse fields with various number spaces
in between....
any help is really appreciated..
Jamie Diaz
------------------------------
Date: Wed, 09 Sep 1998 17:19:43 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: learning perl.........
Message-Id: <linberg-0909981719430001@ltl1.literacy.upenn.edu>
In article <35F6EE41.3ABA@klaskycsupo.com>, jamdiaz@klaskycsupo.com wrote:
> I am trying to learn to create some reports on a UNIX based system..I
> what to take output,such as df -k and output to file...then make it
> readable...
>
> I tried using split to create fields, but the split(//): only takes one
> space into account...How can I parse fields with various number spaces
> in between....
>
>
> any help is really appreciated..
"perldoc -f split" should get you what you need.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 9 Sep 1998 15:46:22 -0700
From: "Christian Brink" <strat@pacifier.com>
Subject: Re: Off topic, but ... [Was Re: Perl & Java - differences and uses]
Message-Id: <35f70565.0@news.pacifier.com>
Unfortunately not a thing :-)
C. Christian Brink,CNE
IS-Manager
All-Sports Supply, LLC
Clackamas,OR
strat@pacifier.com
chrisb@assi.com
I R A Aggie wrote in message ...
>In article <8c7lzdz1it.fsf@gadget.cscaper.com>, Randal Schwartz
><merlyn@stonehenge.com> wrote:
>
>+ Ditto for California (shielding us from Mexico). :)
>
>Ah, but what shields you from those Californicators who seek refuge?
>
>James
------------------------------
Date: Wed, 9 Sep 1998 16:15:27 +0100
From: Mr Blond <dnm1@ukc.ac.uk>
Subject: Opening in a windows 95 serial port with perl.
Message-Id: <Pine.SV4.3.95.980909161413.5404C-100000@gos.ukc.ac.uk>
Hi
I am using a perl program to get information from the serial
port of my pc and strip certain lines out.
The program worked under windows NT but now due to hardware
incompatibility of NT we have had to switch top 95 and the perl
program does not work.
I think its gos something to do with the mode and the way it
sets up the com port.
In NT this line :
mode COM1:4800,n,8,1
is enough to set up the com port then I just open it using :
open FH, 'COM1':
For some reson this will not work under windowsa 95. I have
tested the com port and outpit is being generated but I can't
get the perl program to read it.
Thanks in advance.
Duncan
------------------------------
Date: 10 Sep 1998 00:12:11 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Perl Data Structures: trees etc...
Message-Id: <oeebtop0z4k.fsf@alpha.hut.fi>
John-Paul Arp <jpa@formalsys.ca> writes:
> Where could I find information on how to make linked lists and trees in
> Perl? Does Perl even have pointers?
perldsc
--
$jhi++; # http://www.iki.fi/~jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: Wed, 09 Sep 1998 21:10:09 GMT
From: faust@wwa.com (Faust Gertz)
Subject: Re: Perl Programmer Needed
Message-Id: <35fde6fc.8098873@news.wwa.com>
On Tue, 08 Sep 1998 19:07:49 GMT, "Richard" <Richard@WowMe.com> wrote:
>We all need to remember a few key things here.
>1) Randal refers to "The Rules" as dating back two decades. Two decades
>ago the Internet in general was a different animal. It was used mainly by
>the military and by colleges for research purposes. Now, it involves so
>much more. Things evolve. It doesn't make them worse (sometimes it does).
>As Rick illustrated, the rules HAVE changed to allow for the larger audience
>using the Internet. Men no longer have to wear hats and public and it is
>acceptable for a woman to hold a job and vote. Imagine that! Sometimes
>things were not right in the first place, so they change and in this case
>they did!
Remember this!
Usenet, formerly NetNews, was conceived by two Duke University
graduate students in North Carolina, Tom Truscott and Jim Ellis, in
late 1979, shortly after the release of V7 Unix with UUCP. They
hooked two computers together to exchange information. North Carolina
graduate student, Steve Bellovin, wrote the first version of the news
software using shell scripts and installed it on "unc and "duke" By
the beginning of 1980, "phs" was added and Usenet was born. The
history goes on and on with various advances in hardware, software and
more sites being linked to the network in various ways, but we don't
need to worry about that now. What is important is that "duke",
"unc" and "phs" were using money provided by DARPA (the Defense
Advanced Research Projects Agency, now ARPA since the decoupling from
the Department of Defense). Legend has it the funding came with the
priviso that US Government money not be used for commercial purposes
and as more schools linked to the news feed, they used DARPA money and
operated under the "no commercial use" rule. Eventually the time came
when people did post job ads in comp (computer) and sci (science)
groups, resulting in lots of fighting between those who wanted job
seekers to have access to Usenet job ads and those who wanted to
protect their funding. Finally a compromise was reached and a group
named 'misc.jobs' was formed. The purpose of 'misc.jobs' was to move
all the job ads out of the discussion groups so that discussion could
continue and put all the ads in a convenient place so system
administrators could unsubscribe the group if they were worried about
funding. Many old time Usenet users feel this meant that the
'misc.jobs' newsgroup can only be for the benefit job seekers and that
job ad posters are by law second class citizens and have no right to
post their job ads. According to them, posting of job ads is a
special privilege and they are more than happy to remind job ad
posters of that point. The government funding for the Internet on
which Usenet rides has ended (though this does not mean that
commerical posts are now welcome by all servers), but many veterans
still hold fast to the attitude that job ad posters have no rights,
but are merely permitted to do what they do out of the goodness of the
hearts of the Usenet community. In my humble opinion, job ad posters
are Usenet citizens just like every other citizen and so must respect
the rules and regulations which go along the privilege of posting to
any newsgroup. This doesn't mean we have to bow before the mighty
Usenet veterans, but rather as a good Usenet citizen, we follow
whatever rules are set for particular newsgroups (or for Usenet as a
whole) and if those rules are found to be unfair, we go about changing
those rules in accordance with Usenet policy.
Posting guidelines are adopted to help keep a newsgroup useful. A
particular newsgroup's guidelines were adopted by consensus when the
newsgroup was created and are continually ratified by every user who
subscribes to that newsgroup. Subscribing to a newsgroup is like
entering a community. When you subscribe to a newsgroup, you are in
effect agreeing to observe the guidelines which govern the action of
the group's participants. Every participant has a responsibility to
make sure anything posted to the newsgroup is proper to the newsgroup.
This means accepting the responsibility to ensure no article posted
is in violation of the guidelines and that no article read which is in
violation of the guidelines goes without appropriate action.
Accepting this responsibility is what is required if you are going to
be a Usenet citizen.
If you are wondering why anyone would be so strict about the rules,
you obviously don't appreciate what it means to be a member of a
community. Instead of preaching about communities, I'll give you more
reasons why someone might be strict about the rules.
Unlike communicating to mass audiences through other media, neither
you nor corporate advertisers are paying the bulk of the bill. The
people reading your message and the people supplying the equipment
which carries your message are footing the bill for your article.
Unlike other major media, Usenet is not a medium designed to bring
consumers to advertising. It is designed to exchange information.
If a particular newsgroup doesn't fit your needs, don't try to change
it by arbitrarily picking and choosing to follow guidelines which
suite your purposes and disobeying those which don't. Find a
newsgroup that does, learn how to create your own, or go through the
proper channels to modify the guidelines. When people disregard the
guidelines, a newsgroup quickly becomes an ugly cluttered mess and
then the group is of no use to anyone. The poster no longer has a
suitable audience because the readers either unsubscribe and go else
where or ignore the majority of posts, save those from established
posters.
It is true that there will always be users, often new, who might read
and respond to inappropriately posted messages and thus might still be
of use to a poster after the integrity of a newsgroup has been
corrupted, but this is not a justification for inconveniencing readers
and disrupting the atmosphere of a newsgroup. Nor is the excuse that
if someone doesn't like my message, they can skip them or put my
address in their killfile valid. Every post on Usenet costs users
money. Reading an unwanted post cost a reader connect time charges,
if any, and time which could be spent reading other articles. This
time isn't trivial and it adds up over the course of several readers
and several inappropriate articles. As David Stodolsky explained in
an old comp.groupware FAQ, if even an obviously inappropriate article
is distributed, one that just takes readers a few seconds to scan, and
then skipped or killed, the total time used is still large. David
estimated with 36,000 readers, a post that takes an average of 1
second for each reader to deal with (i. e., examining the subject
line) means a total of ten hours used (36,000 seconds / 3,600
seconds/hour = 10 hours). If your article takes longer to skip or
more readers skip your article, the total time used could be upwards
of a full work week. While no individual user spent 40 hours of
connect time skipping your article, it is very feasible that 40 hours
of connect charges went to skipping your article, 40 hours which could
have been spent retrieving useful articles, instead of skipping yours.
David concludes that only if you spend a week preparing an article
and then post it to a newsgroup, will there be a balance between your
time investment and that used by readers, even if they only scan your
article and make no response or put your in their killfile.
So, not only does an inappropriate article disrupt the integrity of
the newsgroup, it costs money for people even to skip over it and it
attracts other inappropriate articles, further corrupting the
integrity of the newsgroup and puts the usefulness of the entire
newsgroup in jeopardy, both for the inappropriate poster and everyone
else involved. I would go farther than David and say that there is no
way you can match your time investment with the Usenet community's
time investment and so one should make sure every article posted is an
article which would be seen as useful by those that use the newsgroup,
not what you think is useful to the newsgroup. By this I mean, don't
post an article which is inappropriate in either content or format and
claim it is useful by virtue of its being an opportunity for some
lucky user. You may think this is useful, but if the article does not
follow the newsgroup guidelines, subscribers do not find it is useful.
The guidelines state what is useful to subscribers of a newsgroup and
frees you from the anxiety of guessing what is or is not useful.
Follow the rules and everyone's life is much easier.
Streben nach Wahrheit
Faust Gertz
Philosopher at Large
------------------------------
Date: Thu, 10 Sep 1998 02:53:58 +0100
From: "Michael Yevdokimov" <flanker@sonnet.ru>
Subject: pop3 as http
Message-Id: <6t70i9$fbj$1@bison.rosnet.ru>
hi
how to create server like hotmail.com with pop3, but which will use only one
real e-mail?
mike
------------------------------
Date: 9 Sep 1998 12:17:53 -0700
From: Mark Rafn <dagon@halcyon.com>
Subject: Re: Proposal: relative_time() for Time::Local module
Message-Id: <6t6k91$2b4$1@halcyon.com>
Chris Sidi <sidi@angband.org> arranged electrons in a pattern like this:
>I've been doing a lot of relative time stuff recently, like finding
>midnight today or last Sunday midnight.
<AOL>Me too!</AOL>
>I don't want to use a big
>Date/Time module that parses a string for every conceivable absolute and
>relative time format, but I can't just subtract hours, minutes, and
>seconds because of daylight savings shifts.
I'm not sure I understand. I tend to keep times as a time_t, so
adding/subtracting hours, minutes, and seconds are very painless, and
localtime() deals with DST and leap year issues when I'm ready to
output the result.
For example,
print scalar localtime(timelocal(0,10,1,5,3,1998)+60*60), "\n";
prints "Sun Apr 5 03:10:00 1998", showing that one hour (3600 seconds)
past 1:10 on spring leap day in my area is 3:10.
It's adding/subtracting days, weeks, months, and years that are
tricky. My approach has been to use localtime() to get an array of
elements, adjust those elements, then Time::Local::timelocal() to
convert back to time_t format.
I use the same approach to get a specific day or hour - midnight of
the current day is:
use Time::Local;
my @timepieces=(localtime())[0..5];
@timepieces[0..2]=(0,0,0);
print scalar localtime(timelocal(@timepieces)), "\n";
> #Midnight that day - right
> my $m2 = reltime($t1, -12*60*60); print scalar localtime $m2,"\n";
While this may be useful in some instances, I can't think of an
example where I needed to know a specific hour/day/date but didn't need
to do a localtime() anyway to see how much to adjust by. The hard part
isn't doing the adjustment, the hard part is finding out how much to
adjust by. It's easier and less error-prone (IMO) to adjust the
result from localtime and put it through timelocal than to calculate
offset and run it through reltime.
> #There is no 2:30am on leap forward day, so IMO 1:30am + 1hr should equal
> #3:30am (i.e. no correcting for dst shift). Otherwise, people might have
> #infinite loops if reltime($one30am, +60*60) == $one30am
Agreed. No special function required.
> my $hour_later = reltime($one30am, +60*60);
my $hour_later = $one30am, +60*60; # same result
> print scalar localtime $hour_later, "\n";
However, I appreciate you making me think about the problem. I'm thinking
to consolidate my ad-hoc code in various places to make:
timerelative($time,$adj_sec,$adj_min,$adj_hr,$adj_day,$adj_month,$adj_year)
# returns $time, adjusted by the specified elements (integer
# adjustment amount, 0 or undef for no change). Example:
# timeadj(time(),undef,undef,-2,+1,undef,undef) will return the time
# one day forward from two hours ago. Precedence left-to-right (i.e.
# hours are adjusted before days are). Bizarre (i.e. half a month) input
# does whatever timelocal does.
Basically, it will adjust $time by ($adj_sec + 60*$adj_min +
60*60*adj_hr), then do a localtime, adjust days, months, and years on
the array and timelocal to get back to a time_t.
It will fail on the example you give (12N on a DST change-day minus 12
hours is _not_ midnight), and I think it should. Don't do that.
timespecific($time,$sec,$min,$hr,$day,$month,$year,$wday,$next_flag)
# returns $time, adjusted to specified elements (undef for no change)
# If $next_flag is true, time retured will be "specified time AFTER
# $time" instead of "specified time with minimal changes". Undef if
# impossible (i.e. "next 1968 after today").
# ex: timespecific(time(),0,0,0,15,undef,undef,0) would return midnight
# of the 15th of the current month and year.
# timespecific(time(),0,0,0,15,undef,undef,1) would return midnight
# of the next 15th of the month.
Will do localtime to get array, set defined parameters to specified
value, add or subtract days to get nearest weekday match, do timelocal to
get time_t. If $next_flag and $new_time < $time then iterate over time
units - add a minute and check, then add an hour instead, then a day,
etc. If adding a year to the original $new_time doesn't make it >
$time, then return undef.
Comments on this approach appreciated - I may not have thought the
problem all the way through, and, though I've looked, there may already
be a module that does this.
--
Mark Rafn dagon@halcyon.com <http://www.halcyon.com/dagon/> !G
One does not seriously attack the expertise of a scientist using the
undefined phrase "butt-head."
_Sagan v. Apple Computer, Inc._, 874 F. Supp. 1072 (C.D. Cal. 1994)
------------------------------
Date: Wed, 09 Sep 1998 21:11:10 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <O9CJ1.418$k6.4426344@news.shore.net>
Patrick Timmins (ptimmins@netserv.unmc.edu) wrote:
: help me out quick buds ...
Shouldn't be too tough. Since I'm a Certified Perl Diver, I'll be
able to do the work for $149.95/hour and $359.99/hour of phone
support.
:-)
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: Wed, 09 Sep 1998 17:14:18 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <linberg-0909981714180001@ltl1.literacy.upenn.edu>
In article <6t6j8i$h$1@nnrp1.dejanews.com>, ptimmins@netserv.unmc.edu
(Patrick Timmins) wrote:
<a candidate for flamebait of the decade:>
> help me out quick buds ...
> need you now but you gotta respond now ... this will
> go fast ... you gotta be expert html programmer and
html "programmer"?
> know NT web servers like the back of my hand ...
(nah, that's too easy.)
> but you gotta prove yourself first (you gotta give a little
> to get a little ... yeah ... ya know it!)
OK, let's see if I measure up.
> all of our perl programs are giving us some major '500'
> errors to our clients ... not cool ...
I hate those major 500 errors.
> (i know, i know
> why aren't ya usin ASP?
No: why didn't ya read your server documentation to find out what this means?
> well we'll get there dude, we
> just inherited this perl lameness ... maybe you'll help us
> out)
How to make friends in a Perl newsgroup, part 1.
> so here's your perl test ... get this right, and you might
> get a shot at workin here:
> first, our CGI scripts runs from the command line but not the
> browser (500 Server Error) ... what's gives?
Your server doesn't know what to do with your script, so it's giving you
an error. That's what gives. What's do you expect? How should your
server know anything about Perl if you haven't told it?
> two, how do ya extract URLs?
ya use HTML::Parse.
> three, how do ya decode a CGI form?
ya use CGI.pm.
> i took a look 'round the web, to try to get some clues on
> all this, but come up short ...
You didn't look very far. The answers to all of your questions are
sitting right there on your machine. Of course, you have to be willing to
spend a little time reading. Sigh.
> and the perl documentation
> sucks,
How to make friends in a Perl newsgroup, volume II...
> so if you think you can nail this, why not let me
> know ... it could be your last chance to get in on this
Consider it nailed (your "problems" are unbelievably simple), but I'll pass.
> anybody who wants to help me gotta send some email cuz i
> don't normally read this group
I'd like to, but you munged your address and don't feel like burning
braincells on it.
> you help me out ... maybe i'll help you out some time
>
> cool
very.
> p.s.
> Hitlers need not respond
That would just end the thread anyway.
Good luck. You've got a long road ahead.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 9 Sep 1998 17:39:37 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <6t6sip$8vq$1@earth.superlink.net>
I really want to think this is a joke. It's such a *good* joke -
exquisitely composed, as a joke.
And surely no one would really post such a thing in seriousness - ?!
(Especially piggybacking it on a thread of which it is a parody?)
Or have things indeed gone that far?
David Black
dblack@saturn.superlink.net
------------------------------
Date: Wed, 09 Sep 1998 18:00:33 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <linberg-0909981800340001@ltl1.literacy.upenn.edu>
In article <6t6op5$ppm$1@marina.cinenet.net>, cberry@cinenet.net (Craig
Berry) wrote:
> ...and you just succeeded in alienating virtually *everyone* on clpm, for
> whom 'perl' and 'lameness' don't comfortably cohabit a sentence.
How about "Use Perl for the eradication of lameness"? :)
I'm more convinced now that this post was a joke. It has to be. It's
probably Chip in disguise. :) :)
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 9 Sep 1998 22:06:56 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <6t6u60$ppm$3@marina.cinenet.net>
Steve Linberg (linberg@literacy.upenn.edu) wrote:
: In article <6t6op5$ppm$1@marina.cinenet.net>, cberry@cinenet.net (Craig
: Berry) wrote:
:
: > ...and you just succeeded in alienating virtually *everyone* on clpm, for
: > whom 'perl' and 'lameness' don't comfortably cohabit a sentence.
:
: How about "Use Perl for the eradication of lameness"? :)
Witness again one of the ways in which hanging with geeks gets annoying. :)
: I'm more convinced now that this post was a joke. It has to be. It's
: probably Chip in disguise. :) :)
For all our sanity, I'm praying it's so...
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 09 Sep 1998 22:36:48 GMT
From: David@iqtexas.com
Subject: Re2: sprintf error in Perlis and PerlScript
Message-Id: <6t6vu1$kio$1@nnrp1.dejanews.com>
Sorry about the confusion. Here is the real code...
I was in the middle of VB crap when I sent the original post .... argh.
$pct=( $data{hgames} == 0 ) ? ( 0 ) : ( sprintf('%.1f',($data{PFH}/$data
{hgames})) );
Note: $data{PFH}=45 and $data{hgames}=3
Here is the error it returns ...
error '80004005'
Internal Error
?
Thanks again for any help,
David
In article <833ea1kyqc.fsf@vcpc.univie.ac.at>,
Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at> wrote:
> Re: sprintf error in Perlis and PerlScript, David
> <David@iqtexas.com> said:
>
> David> When ever I use sprintf in Perlis or ASP(PerlScript),
> David> errors are returned.
>
> David> ... y=1034.5635; x=sprintf("%.1f",y); ...
>
> (You don't need double-quotes around the sprintf format
> string, single ones will do.)
>
> You do mean `$x' and `$y' throughout, don't you?
> and
> $self->kick('bottom');
>
> hth
> tony
> --
> Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
> Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
> "You see? You see? Your stupid minds! | private email:
> Stupid! Stupid!" ~ Eros, Plan9 fOS.|
<URI:mailto:tony_curtis32@hotmail.com>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 9 Sep 1998 16:53:05 -0600
From: "Eric Pan" <pan@part.net>
Subject: Saving an Array or Hash into a $Session Variable in ASP?
Message-Id: <35f70674.0@news.slc.bfp.net>
I have been trying to save a reference to an array into a Session variable
and it doesn't work?
For example,
<% $Session->{'MyVar'} = \("abc","xyz"); %>
I get empty result when I try to access it
<% $Response->write(join(",",@{$Session->{'MyVar'}})) %>
If I have save array i.e.
<% $Session->{'MyVar'} = ("abc","xyz"); %>
I get xyz.
Anyone know what's wrong? And how do I save reference to an array in Session
variable.
Thanks.
--
-- Eric Pan
------------------------------
Date: Wed, 09 Sep 1998 16:14:46 -0500
From: "Chris N. Hinds" <chris.hinds@arm.com>
Subject: Use of 'exit' in child process
Message-Id: <35F6EFC6.69C4D184@arm.com>
I hope this is a simple one...
In a child process I have an 'exit' as the last
statement, and I have verified that nothing after
the exit will execute. In the parent process I have
a 'sleep 10' (longer than the child) and a test for the
pid of the child using a 'kill(0, $pid)'. The test returns
a 1 after the sleep 10, and a 1 again after a 'kill(9, $pid)'!
Why are the outputs of the kill 0 both 1 when the process
has exited?
Thanks for the help!
chris
--
*********************************************************
* Chris N. Hinds <>< 512-314-1055
* ARM Austin Design Center FAX 512-314-1078
* ARM INC chris.hinds@arm.com
*********************************************************
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 3672
**************************************