[8262] in Perl-Users-Digest
Perl-Users Digest, Issue: 1879 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 12 17:07:49 1998
Date: Thu, 12 Feb 98 14:01:37 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 12 Feb 1998 Volume: 8 Number: 1879
Today's topics:
Re: Metacharacters - Advice please. (Jonathan Stowe)
Re: Name of an download file (Ian Kallen)
Re: Need some help ! <jdporter@min.net>
Re: Newbie needs HELP (Martin Vorlaender)
On Helpdesks, Newbies, and FAQ's dg50@chrysler.com
Re: PC vs PC vs PC (was: Multithreaded servers and comm <jdporter@min.net>
PERL in Windows 3.11 (A M Borregana)
Re: Perl Wizard Quiz <shimpei+this+address+is+NOT+munged+.mil+.gov@socrates.caltech.edu>
Re: PUZZLE: Answer me these questions three (Mike Wescott)
Re: RFC about ``Matt's Script Archive'' <jdporter@min.net>
Re: scope of $<digit> <*@qz.to>
Re: test!! please ignore this message i am seeing if it <jdporter@min.net>
Re: Text parsing <jdporter@min.net>
Re: The Young Man and the Beach (Andy Lester)
Re: The Young Man and the Beach <althomas@SSELMAPStogether.net>
Re: The Young Man and the Beach <moises@texas.net>
Re: Too simple to ask but then .... <jdporter@min.net>
Re: Why is Tom Christiansen so rude? <zenin@best.com>
Re: Why is Tom Christiansen so rude? <tmh@possibility.com>
Re: Why is Tom Christiansen so rude? (Rahul Dhesi)
Re: Win32: Ping <jorgep@mich.com>
WWW Page <toiletgod@toiletland.nws.net>
Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Kaz Kylheku)
Re: Year 2000 Compliance: Lawyers, Liars, and Perl <jdporter@min.net>
Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Peter Seebach)
Re: Zero-width positive lookahead assertion Q <*@qz.to>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Feb 1998 20:12:24 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Metacharacters - Advice please.
Message-Id: <6bvl38$7sv$2@plutonium.btinternet.com>
In article <34e1e0f8.8650240@news.skynet.co.uk>, networks@skynet.co.uk
says...
>
>On Wed, 11 Feb 1998 16:57:23 GMT, networks@skynet.co.uk (User) wrote:
>
>>Are metacharacters only a problem when the script executes another
>>program, eg, sendmail? or should all scripts check for metacharacters?
>>
>>Thanks.
>
>Opps!
>
>Will the following make form input 'safe':
>
>$value =~ s/~!/ ~!/g;
>
a starting point to consider could be a situation like this:
#.. sundry parsing and wailing of teeth
$value =~ s/~!/ ~!/g;
$return = `ls $value`; #for a simple example
#.... blah blah
now what would the consequence be of the user entering
/home/something; rm -rf /
into the form ?
/J\
------------------------------
Date: 12 Feb 1998 20:26:22 GMT
From: spidaman@well.com (Ian Kallen)
Subject: Re: Name of an download file
Message-Id: <6bvlte$oji$2@was.hooked.net>
Add an extra header thusly and you should be set:
Beranger Bruneton (beran@isdnet.net) wrote:
: > print "Content-type: application/octet-stream\n" ;
: > print "Content-length: ".$size."\n";
print "Content-Disposition: inline;filename=myfile.tar\n";
: >
: > print "Expires: -1\n";
: > print "\n";
: > open(DNL,"/myfile.tar" )|| &logError ("Cannot open
: > File:".$pathfile."\n");
: >
: > while( <DNL> )
: > {
: > print $_ ;
: > }
--
Ian Kallen <spidaman@well.com>
"Like so many Americans, she was trying to construct a life that made
sense from things she found in gift shops."
-- Kurt Vonnegut, Jr.
------------------------------
Date: Thu, 12 Feb 1998 09:57:20 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Need some help !
Message-Id: <34E30DD0.1C95@min.net>
Tarmo Pikaro wrote:
>
> Ok here is my problem...
> I'm writing CGI.
> and I read in like this:
> open (FILE,"somefile") || die "Can't Open file\n";
> @XLINES=<FILE>;
> close(FILE);
> $SIZE=@XLINES;
> for ($i=0;$i<=$SIZE;$i++) {
> $recipient=$XLINES[$i];
> and at this point I have string with enter at the end.
> How can I convert - so there wont ne any enter ??????????
> like this... $resipient2 = someactions( $resipient );
Watch and learn.
$filename = "somefile";
open (FILE, $filename ) || die "Can't Open file $filename: $!\n";
@XLINES = <FILE>;
close(FILE);
for $i ( 0 .. $#XLINES ) {
my $recipient = $XLINES[$i];
chomp( $recipient );
# etc.
}
Even better:
$filename = "somefile";
open (FILE, $filename ) || die "Can't Open file $filename: $!\n";
chomp( @XLINES = <FILE> );
close(FILE);
for $recipient ( @XLINES ) {
# etc.
}
Or, if you don't need to keep the entire array of lines,
and don't mind having the file open for a while:
$filename = "somefile";
open (FILE, $filename ) || die "Can't Open file $filename: $!\n";
for ( <FILE> ) {
chomp;
$recipient = $_;
# etc.
}
close(FILE);
Note: these different forms do not all do exactly the same thing.
Which way is better depends somewhat on your needs.
hth,
John Porter
------------------------------
Date: Thu, 12 Feb 1998 21:25:24 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Newbie needs HELP
Message-Id: <34e35ab4.524144494f47414741@radiogaga.harz.de>
David W. Smith (davidsmith@tidalwave.net) wrote:
: The problem I have is that I can't get the directory created
: where I want it -- someplace other than the home directory where the
: script is run. The chdir command appears to have no effect.
: I thought something like:
: chdir ("c:\newdir");
: mkdir ("newroot", 0755);
: chdir (c:\newdir\newroot");
: mkdir ("newsubdirectory", 0755);
: would create a directory tree where ever I wanted (on the same file
: system). It doesn't. All I get is "newdir" and "newsubdir" in the
: sameplace. I'm runnning PERL5.000 under Win NT4.0. Soon I will want to
: port to UNIX as well.
Change that \'s to /'s . Even WinNT will understand your paths (and you
won't have to escape all those \'s in doubly-quoted strings).
A matter of taste: If there's nothing to interpolate in your string (i.e.
variables or special characters), use single instead of double quotes.
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Thu, 12 Feb 1998 15:38:25 -0600
From: dg50@chrysler.com
To: tchrist@mox.perl.com,merlyn@stonehenge.com
Subject: On Helpdesks, Newbies, and FAQ's
Message-Id: <887318802.346947598@dejanews.com>
I've been following the current "give Tom a hard time for being Tom"
"Newbies don't read FAQs" "We need to be moderated" etc. threads, and you
know, I've been here before.
About 2 years ago, I discovered Netrek, a primarily X-Windows (but ported
to other machines) networked space battle/conquest game. No, "game" isn't
the right word, "sport" is more like it. Perhaps "obsession" works too.
Anyway, the Netrek community consisted of two distinct camps: The
old-timers who had played the game since it's conception, and the newbies
who discovered the game, downloaded it, unpacked the archive, and who
wanted to learn how to play.
Netrek is a complex game with a steep learning curve that _requires_
interaction and co-operation between players. It is not the kind of game
where you can start from zero and figure it out as you go along. The best
analogy I can give is taking your average North American and dropping him
feet-first into a championship cricket match.
Not suprisingly, rec.games.netrek was chock full of FAQ type questions.
Most of these questions came from Windows PC users, because it was most
of the computers out there on desktops just happen to be Windows PCs. I
don't like it, but there we are. Anyway, as most of the old-timers were
diehard academic UNIX hacker types, there was a fair amount of friction
in the newsgroup. You think Tom C is abrasive? Do a Deja News search on
'Sunscreamer' (note - rated 'X'!) and enjoy the show. :)
(Bonus points for those who get the perl->Sunscreamer connection...)
I dropped into the Netrek world, and decided to help. I answered every
FAQ in sight as patiently and as simply as I could - and posted all the
answers to the ng in the hope of killing other "just about to post, and
look! Here's my answer!" posts.
After a while though, I got tired of answering all these questions "by
hand" . Fortuitously (for me), the maintainer of the brand-new Netrek
Home Page was having a bit of a rough spot in RL, and gave me the keys to
the web page. I then set out to put every single answer to every single
question I could think of on these pages. Even better, I set out to
answer questions before they became questions by writing step-by-step
tutorials for all the common tasks in the game - both installing and in
actual game play.
It was a LOT of work. I put a TON of time into it. Newbie posts for all
intents and purposes _vanished_ within a month.
The experiance taught me a number of things:
1) Repetition is they key to communication, especially with newbies. In
other words, if you want someone to read something, you have to make sure
that you put it in front of them as many times as possible.
Here's what I mean - Netrek had an excellent FAQ, produced and kept up to
date by one of those oldtimers I mentioned. It was posted to the
newsgroup every week, and it came in the archive with the game. But... it
often wasn't in a newsreader window when a newbie first dropped in, and
for some reason Windoze users don't seem to expect docs to come with an
archive (I blame that on the poor shell in Windows) - so it wasn't
getting read. My solution: Put an FAQ link on every single web page, and
beat them over the head with it, like this:
To Install Netrek on Windows 95
1) Download and read the _FAQ_
2) Now go back, and read the _FAQ_
3) You read the _FAQ_, right?
4) Now download _COW-LITE1.02,zip_....
2) People (for better or worse) want explicit answers to their problems.
Therefore, an answer that contains step-by-step explicit instructions has
a much better chance of being read (and followed) than a more
conversational answer that contains the _exact same information_
3) The single most important design point on a Help document is a logical
structure that directs people to the answer they want in the simplest and
quickest way possible. Obscure or opaque (but correct) information is just
as bad as incorrect information, as it prevents the newbie from absorbing
the information - which is the ultimate aim of the exercise.
4) People are naturally lazy. Given the choice between clicking on a
mailto: link, or filling out a web form that duplicates the browser's
built in mailer, 75% of people will fill out the form. Given the choice
between clicking on a web link, and posting to USENET, most will click
the web link. (This was the success of the Netrek Home Page)
This brings us to my suggestion.
There is a need for www.perl-for-morons.com. Put the FAQ there. Put the
entire perldoc tree there. Put lots of step-by-step tutorials there. Put
solutions to common problems there. Make finding an answer on the web
page easier than posting here (or doing anything else!), and post "your
answer is on www.perl-for-morons.com. Do a search on "web counter""-type
answers to FAQ's posted here.
Yes, this information is available in other places, and in other formats.
See point #1. You cannot put too much information in front of a newbie IF
it is written in such a way as to be easy to use.
The Linux HOWTOS are another great example of what I mean. The KISS
principle rules the Internet.
This isn't to say that the existing resources of this type are _bad_ in
any way, they just need amplification. I didn't create a single byte of
my own Netrek documentation, I just rewrote and reformatted what was
already there to be more newbie friendly. Sure, it meant having separate
install tutorial pages for Win3.1, Win95, Mac, Amiga, and UNIX (that were
all almost identical) but it got the questions answered, and that killed
the unwanted newsgroup traffic.
What works, works, right? TMTOWTDI.
One final point.
My story doesn't have a happy ending. Those abrasive old-timers I
mentioned before continued to be abrasive to everyone - including me, and
often downright abusive. Despite all the hard work I sank into that
project, and all the benefit the old-timers got from it, I got nothing
but flack and abuse from most of them. During the whole 2 years or so I
ran that page, I didn't get a single damn "thank you" from any of them
(not the newbies, they were great). After a while, the heartache wasn't
worth the effort any more, and I took my ball and went home.
I checked in a month later, and the newbies had returned to the newsgroup
en masse.
Enough rambling. Take what lessons from my experience that you will. (or
will not, as applicable)
Tom, Randall, Larry (I know you're out there somewhere)
Thank you.
DG - who wonders if his "5 year old's firearms requirements" post got him
into Tom's killfile
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 12 Feb 1998 10:17:27 -0500
From: John Porter <jdporter@min.net>
Subject: Re: PC vs PC vs PC (was: Multithreaded servers and communicating object processes (proper))
Message-Id: <34E31287.2589@min.net>
Tom Christiansen wrote:
>
> Here's the customary definitions of that multply overloaded word
> as used by me and programmers of my acquaintance.
> [#2]
> PC: "program counter"; one of the machine's fundamental registers,
> whose value indicates the current machine-level instruction
> being executed. A program that forks several times has several
> PCs operating on the same code. Largely synonymous with "thread
> of control". Cf "SP".
> Usually when I say "PC", I mean definition number two, and only rarely
> number three.
I have to raise an exception to this definition. As a fundamental
register of the machine, there is only ever exactly one (per machine).
If you have software threads, you still only have one PC.
The correct relationship is more like this:
thread --[hasa/isa]--> activation record --[hasa]--> saved PC value
It does not logically follow, then, that
thread --[isa]--> PC register
In a nutshell, there's a lot more to a process, even a light-weight
one, than its current value of PC.
If you mean thread, say thread (or process, or activation record),
rather than throwing hardware register names spanner-like into
the paths of the innocent. (uh...)
John Porter
------------------------------
Date: 12 Feb 1998 18:53:50 GMT
From: A.Migueis@shef.ac.uk (A M Borregana)
Subject: PERL in Windows 3.11
Message-Id: <6bvgfu$r0f$1@bignews.shef.ac.uk>
I have installed the server winhttpd1.4 in my PC Penthium, and added the
bigperl version4.
I installed everything but when the server is running and I call the script it
returns me this message:
500 Server Error
The server encountered an internal error or misconfiguration and was unable to
complete your request.
Message: could not read from script
Please contact the server administrator, a.migueis@sheffield.ac.uk and inform
them of the time the error occured, and anything you might have done that may
have caused the error.
If i run it from the command line it is ok...
What is happening??
a.migueis@sheffield.ac.uk
Antonio
------------------------------
Date: 12 Feb 1998 21:44:48 GMT
From: Shimpei Yamashita <shimpei+this+address+is+NOT+munged+.mil+.gov@socrates.caltech.edu>
Subject: Re: Perl Wizard Quiz
Message-Id: <6bvqgg$3ch@gap.cco.caltech.edu>
Tom Christiansen <tchrist@mox.perl.com> writes:
># ============= ranquiz ==============
>if test -f 'ranquiz' && test "$first_param" != -c; then
> $echo 'x -' SKIPPING 'ranquiz' '(file already exists)'
>else
>shar: Saving ranquiz (text)
^
|--- Maybe I'm doing something wrong, but I think this line needs
to be commented out.
> $echo 'x -' extracting 'ranquiz' '(text)'
> sed 's/^X//' << 'SHAR_EOF' > 'ranquiz' &&
>X#!/usr/bin/perl -00
--
Shimpei Yamashita <http://www.patnet.caltech.edu/%7Eshimpei/>
The address I have listed in the headers is a working address. It just
looks like it's an invalid address in order to fool spammers collecting
addresses from newsgroups.
------------------------------
Date: 12 Feb 1998 14:59:29 -0500
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: PUZZLE: Answer me these questions three
Message-Id: <x4lnvgsify.fsf@cygnus.ColumbiaSC.NCR.COM>
In article <6btdvg$2c4$11@csnews.cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
This was the most interesting thing I've read in clpm in a long time.
Got any more that you'd be willing to share with us, Tom?
> Question 1: Is this program recursive?
No.
> Question 2: How many hashes does it use?
2
> Question 3: What are the names of these hashes?
%login, %group
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: Thu, 12 Feb 1998 10:24:19 -0500
From: John Porter <jdporter@min.net>
Subject: Re: RFC about ``Matt's Script Archive''
Message-Id: <34E31423.4753@min.net>
Tom Christiansen wrote:
>
> You'd think he'd have the good sense now to display his
> dirty laundry in public then.
Uh, s/now/not/ ???
I wonder if Matt's ears are burning...
John Porter
As Tom says, "it's likely to get you talked about."
------------------------------
Date: 12 Feb 1998 20:33:35 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: scope of $<digit>
Message-Id: <qz$9802121516@qz.little-neck.ny.us>
David Proffitt <D.M.Proffitt@mds.qmw.ac.uk> wrote:
> The FAQs say that the scope of $<digit> is the current block or until
> the next match using a backreference
Either that FAQ is wrong or you read wrong. From perlre:
The scope of $<digit> (and $`, $&, and $') extends
to the end of the enclosing BLOCK or eval string,
or to the next successful pattern match, whichever
comes first.
No mention of "next match using a backreference" there. This does not
mean that it won't *sometimes* work, but you should not rely upon it.
> elsif (/<(.*?)>/ and /[^<\/$1>]/) {
You greatly misunderstand [character classes].
Elijah
------
#!/usr/bin/perl -- -*- my ny.pm sig -*-
$_=$^ ;s;s;sss;;s^.^ju^&&s&P+&\n&&&(s(_..)(ers)||s|^|^^|)&&s(T)(q(st%eg))eg;
s<.(o).><$& new 1$$>i+s+\dst.+$a--||reverse(q(rep k))+ge;s*%.+u* so+*i;s=\++
="me"=mex&&s%ege%l$"hke%;$a||s/^\S+ /\/\//;s;\d+;yor;;s[KE]<ac$&>i;print $_;
------------------------------
Date: Thu, 12 Feb 1998 11:41:01 -0500
From: John Porter <jdporter@min.net>
Subject: Re: test!! please ignore this message i am seeing if it works!
Message-Id: <34E3261D.480A@min.net>
Russell Bornschlegel wrote:
>
> John Porter wrote:
> >
> > Brandon Blum wrote:
> > >
> > > never done a newsgroup before, trying to learn perl and i want
> > > to post,
> > > hopefully this works, just ignore it!
> >
> > Certainly never read a FAQ.
> > Never heard of netiquette.
> > First thing he does is spam our newsgroup!
>
> And you were never a newbie, I'm sure. How's he supposed to
> know that FAQs and netiquette exist if he hasn't read the
> newsgroups?
Exactly the point. Anyone who has read, say, 1% of the messages
on this group would know they'd get slammed for such a posting
as that.
> At least he didn't post in all caps.
Thank god for small blessings, I guess.
John Porter
------------------------------
Date: Thu, 12 Feb 1998 11:02:22 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Text parsing
Message-Id: <34E31D0E.6B33@min.net>
brian.russo@nextel.com wrote:
>
> Hello. I am attempting to write a perl script to read a log file (from
> a Nortel Switch) and parse out a couple different pieces of data. The
> log file is formatted in such a way that the headers and the data are
> seperated. For example:
The trick, probably, is to set the input separator $/ to
"\n\n". Read up on this variable. Once you've done that,
you can treat this file the same as you would treat a file
that looked like this:
Hdr1 Hdr2 Hdr3
0 1 2
3 4 5
...
Clearly, you want to split each line (record) into an array
(split on whitespace: split(" ",$line)).
Then, if the line is the first line, it's the headers, otherwise
it's data. Or you might want something more sophisticated to
indicate whether a record is the headers, e.g. with a regex:
$/ = ""; # magic: same as "\n\n";
for (<>) {
chomp;
my @a = split; # magic: splits $_ on whitespace
next unless @a; # skip empty records.
if ( $a[0] =~ /^C7/ ) { # looks like a header
@headers = @a;
}
else { # must be data
push( @records, \@a ); # save a reference to the record
}
}
Now, the position of an item in a record corresponds to the
header of the same index. That is, $header[3] is the header
field for $records[$i][3], for every value of $i.
hth,
John Porter
------------------------------
Date: 12 Feb 1998 20:15:13 GMT
From: petdance@maxx.mc.net (Andy Lester)
Subject: Re: The Young Man and the Beach
Message-Id: <6bvl8h$7h7$1@usenet40.supernews.com>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: Once upon a time, a sharp young man opens the window from his cottage and
: contemplates a morning stroll. The day is clear and crisp, and the sea
...
: someday help the sick and the needy. Perhaps he won't return to the beach
: after all. When a simple morning stroll becomes so arduous an event as
: he has recently experienced, it really doesn't seem worth the trouble.
You forgot the part where the young man mocks the vagabonds for having
different clothes than he. "And while you're getting a job, get yourself
some new trousers. Those aren't trousers," he mocks, "they might as well
be a burlap sack with leg holes." You left out the part where the others
on the beach scratch their heads wondering how such berating is likely to
encourage anyone to get a job.
xoxo,
Andy
--
--
Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
------------------------------
Date: Thu, 12 Feb 1998 15:31:27 -0500
From: Al Thomas <althomas@SSELMAPStogether.net>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: The Young Man and the Beach
Message-Id: <34E35C1F.2C5B@SSELMAPStogether.net>
Tom Christiansen wrote:
>
...
> after all. When a simple morning stroll becomes so arduous an event as
> he has recently experienced, it really doesn't seem worth the trouble.
>
> --
> Tom Christiansen tchrist@perl.com
>
> "Computer Science is no more about computers than astronomy
> is about telescopes." --E.W. Dijkstra
Well said.
------------------------------
Date: Thu, 12 Feb 1998 14:44:55 -0600
From: "Moises G. Solis" <moises@texas.net>
Subject: Re: The Young Man and the Beach
Message-Id: <34E35F47.DD26CEF2@texas.net>
Your art is moving. It's like a song.
http://www.godsdailyword.com/DisplaySelect.stm?89
By the way, when I went to the lumberyard, they said I was too old, didn't
have experience using sockets with Java, and didn't have blinders on to focus
my direction.
So, if you have half a loaf, I will share it with my family as we read your
book.
Moises.
------------------------------
Date: Thu, 12 Feb 1998 11:36:22 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Too simple to ask but then ....
Message-Id: <34E32506.7990@min.net>
Webmaster wrote:
>
> I am afraid to ask - are they just giving out systems engineering degrees in
> Singapore now?
I'd say they're just handing out English degrees.
John Porter
------------------------------
Date: 12 Feb 1998 20:04:01 GMT
From: Zenin <zenin@best.com>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <887314106.169948@thrush.omix.com>
Gurusamy Sarathy <gsar@engin.umich.edu> wrote:
: People who get to know the interface _always_ find him indispensable.
I'm sorry, but I find no desire to know anything about
Tom's "interface", thank you... :-)
: The problem with that approach is that Perl itself did not work
: properly on Windows until recently.
It probably doesn't help that Windows doesn't run properly on
Windows.
: Curiously, the most recent version
: even goes ahead and crashes Windows, perhaps because he knows it
: is pointless running there if he cannot do anything useful, which
: seems logical in a cold sorta way.
I think it's more that it feels (quite correctly) that the world
in general would be much better off with one less running Windows
machine.
--
-Zenin
zenin@best.com
------------------------------
Date: Thu, 12 Feb 1998 12:05:44 -0800
From: Todd Hoff <tmh@possibility.com>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <34E35618.18E0033@possibility.com>
Douglas McNaught wrote:
> So you're saying we are his customers. I disagree.
You are so missing the point. It's a metaphor. For whatever
reason tom takes it on himself to answer *a lot* of questions
from a lot of people. When people deal with other people
for long periods of time under less than ideal social
conditions it is not uncommon for such people to begin
to feel "contempt for their customer." It happens with
cops, it happens with wait persons, it happens with tech
support, it happens in sales, it happens.
RTFM
------------------------------------------------------------------
tmh@possibility.com http://www.possibility.com/Tmh
I have no interest in any ship that does not sail fast, for I
plan to go in harm's way. -- J.P. Jones
------------------------------
Date: 12 Feb 1998 21:34:48 GMT
From: c.c.eiftj@15.usenet.us.com (Rahul Dhesi)
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <6bvpto$q2q$1@samba.rahul.net>
In <34E342E1.31480C4F@possibility.com> Todd Hoff <tmh@possibility.com>
writes:
>I've bought them and i've posted questions that have turned
>out to be in the FAQ. I remember in an SGI question that
>turned to be in the FAQ even though i read the damn thing
>a billion times. Not everything is a willfull disobedience.
It happens to the best of us. If when posing the question you explain
where you looked and did not find the answer, you will seldom get
flamed.
--
Rahul Dhesi <dhesi@spams.r.us.com>
------------------------------
Date: 12 Feb 1998 21:26:06 GMT
From: Paul Jorgensen <jorgep@mich.com>
Subject: Re: Win32: Ping
Message-Id: <6bvpde$912$1@server3.mich.com>
In comp.lang.perl.misc Dr.-Ing. Olaf H. Kelle <Olaf.Kelle@bc-verlag.de> wrote:
> Hi,
> has anyone solved the problem - or has an idea - for the Net::Ping under
> Win32 (ActiveState port) ?
> Thank you very much.
> Olaf
Hi.
Get the update off of CPAN. Here you are...
<http://www.perl.com/CPAN-local/authors/id/RMOSE/Net-Ping-2.02.tar.gz>
It solved all of my pinging needs. It works with AS build 315 in WinNT swell.
Paul
------------------------------
Date: Thu, 12 Feb 1998 13:44:36 -0600
From: ToiLeTGoD <toiletgod@toiletland.nws.net>
Subject: WWW Page
Message-Id: <34E35124.5ABA193E@toiletland.nws.net>
Hey,
Question being, I want to have a bunch of perl scripts only runable
by people who have the password. I have this as of now at the beginning
of the .pl scripts...
exit unless $ENV{QUERY_STRING} eq 'testpassword';
but I want it so that instead of exiting the script if the password is
not correct, to reroute the request to a different page. Perhaps
badpassword.htm or something along them lines. Anyone know how to
perform this? You can e-mail me or reply here! Thanks alot.
ToiLeTGoD
toiletgod@toiletland.nws.net
------------------------------
Date: 12 Feb 1998 21:17:56 GMT
From: bill@cafe.net (Kaz Kylheku)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <6bvou4$g40$1@brie.direct.ca>
In article <fl_aggie-1202981344090001@aggie.coaps.fsu.edu>,
I R A Aggie <fl_aggie@thepentagon.com> wrote:
>In article <Pine.GSO.3.96.980211170630.13587A-100000@area51>, David Lee
>Lambert <lamber45@EGR.msu.edu> wrote:
>
>+ time strings. (It probably would be a good idea to add a note to the
>+ manpage that talks about struct tm mentioning that addition, not
>+ tructuation, is the way to produce a four-digit year.)
>
>It isn't necessary, unless you want to be explicit (excerpt from ctime(3)):
>
> Declarations of all the functions and externals, and the tm structure,
> are in the time.h header file. The structure declaration is:
>
> struct tm {
>[snip]
> int tm_year; /* years since 1900 */
The language isn't defined by your man page, but by a standard document.
>That's fairly obvious that tm_year is an _offset_ from 1900, and that
>four_digit_year=1900+tm_year. If someone with any grasp of English can't
>deduce from that section of the man page that one has to _add_ 1900
>to the returned value tm_year, then perhaps they shouldn't be programming?
I could say the same about people who use man pages as their language
reference manual.
------------------------------
Date: Thu, 12 Feb 1998 11:25:03 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <34E3225F.664B@min.net>
Bart Lateur wrote:
>
> >Is "cal" and related utilies even usable for that far back in time?
Must a been; cal itself was first written around 72 AD :-)
> I got 2 replies so far, telling me that the "correction date" was in
> september 1752, and that cal knows about it.
>
> I thought it was in the 1500's. And I was right. It really depends on
> your geographic position: the correction I'm talking about is named
> after pope Gregory XIII, and the first correction took place in october
> 1582. Not all countries adopted this at the same time.
>
> So: does "cal" know about his? Does it guess where you are, so that it
> can take the appropriate correction? Of course not.
Doesn't need to. I'm in the U.S., cal works for the U.S. (and the U.K.)
so it is correct for me and my system (which uses GMT ;-).
> At least, I hope it won't even try.
Why not? That's what locales and timezones are for!
> So calenders of dates before 1752 (or 1582) are not very meaningful.
Certainly meaningful enough for those of use who live in the U.S. or
U.K. And plenty meaningful for all years between 1 and 1582; that's
when we all used the same calendar.
John Porter
------------------------------
Date: Thu, 12 Feb 1998 21:48:48 GMT
From: seebs@plethora.net (Peter Seebach)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <47KE.106$b%5.175245@ptah.visi.com>
In article <6bvou4$g40$1@brie.direct.ca>, Kaz Kylheku <kaz@cafe.net> wrote:
>> struct tm {
>>[snip]
>> int tm_year; /* years since 1900 */
>The language isn't defined by your man page, but by a standard document.
True, but that's exactly what the standard document says, too. The struct
tm has been Y2K-ready for a long time.
I dread the 34,667 bug.
-s
--
seebs@plethora.net -- I am not speaking for my employer. Copyright '97
All rights reserved. Boycott Spamazon! End Spam. C and Unix wizard -
send mail for help, or send money for a consultation. Visit my new ISP
<URL:http://www.plethora.net/> --- More Net, Less Spam! Plethora . Net
------------------------------
Date: 12 Feb 1998 21:17:25 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Zero-width positive lookahead assertion Q
Message-Id: <qz$9802121524@qz.little-neck.ny.us>
D2DEFB28@i33.com>, David Griffin <griffin@i33.com> wrote:
> I'm trying to add commas to long numbers, eg, 1234123545 becomes
> 1,234,123,545. It seems to me that this should do the trick:
The FAQ (part 5) gives a way to do this, and see that for the
correct answer. I'm just going to help you understand your RE.
> $num =~ s/(\d{1,3})(\d{3})(?=\d{3})*$/\1,\2/g;
There are many things wrong with that. First off use $1 and $2.
Secondly, since you do not anchor at the begining, but do anchor
at the end, "(?=\d{3})*" is going to match zero digits the first
time, puttint a comma in at the end, and then the $ will fail to
match if you run the s/// again. Thirdly your preference for end
anchoring will result in intermixed three and six digit strings
when fixed for allowing commas to match, eg:
# if $num was 111222333444555666777888999000
$num =~ s/(\d{1,3})(\d{3})(?=(\d{3})*($|,))/$1,$2/g;
# now it is 111,222333,444555,666777,888999,000
Still, it is an interesting attack and will allow you to commafy
a number in two passes, which might be the best you can get out
of an s/// (barring /e or input massaging such as reverse).
Elijah
------
($h,$t)=/(\d{1,3})((?:\d{3})*)\b/;@a=$t=~/(...)/g;unshift@a,$h;$_=join",",@a;
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 1879
**************************************