[8236] in Perl-Users-Digest
Perl-Users Digest, Issue: 1854 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 10 21:07:40 1998
Date: Tue, 10 Feb 98 18:00:02 -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 Tue, 10 Feb 1998 Volume: 8 Number: 1854
Today's topics:
Re: ? Regular Expressions ? <fp@pmpcs.com>
Re: ? Regular Expressions ? <tchrist@mox.perl.com>
Re: array question <tchrist@mox.perl.com>
Re: Best way to test for binary data? <tchrist@mox.perl.com>
Re: Control a serial device with Perl <tchrist@mox.perl.com>
Re: debugging perl script <tchrist@mox.perl.com>
Re: Delays of less than a second? <danboo@negia.net>
Re: From another wingeing newbie <tchrist@mox.perl.com>
Re: Hashes Usage (David Efflandt)
Re: HELP - MULTIPLE LEVEL SORT? <tchrist@mox.perl.com>
Re: How generate counter? <tchrist@mox.perl.com>
Re: How to "override" modules with -MModule ? (Martien Verbruggen)
Re: How to write a perl module <tchrist@mox.perl.com>
Re: Huge arrays: 'Out of Memory' <cdkaiser@delete.these.four.words.concentric.net>
Re: Learning Perl <corky@ultranet.com>
Re: Matt's Script Archive (Frank)
Re: Newbie:Perl Modules <tchrist@mox.perl.com>
Re: Pasting to STDIN (David Efflandt)
Re: perl form problem <tchrist@mox.perl.com>
Re: Perl HTML output in Win 95 <tchrist@mox.perl.com>
Re: Perl lessons Hong Kong <tchrist@mox.perl.com>
Re: Perl problems with anonymous users <tchrist@mox.perl.com>
Re: polyform error <tchrist@mox.perl.com>
Re: Problems installing DBI on Win 95 (Gurusamy Sarathy)
Re: Rounding Off Decimal Numbers (Gabor)
Re: sorting an associative array <tchrist@mox.perl.com>
Re: SYSTEM command - How do you return data to the brow <tchrist@mox.perl.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 10 Feb 1998 19:57:55 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Re: ? Regular Expressions ?
Message-Id: <34e0f7be.0@news1.ibm.net>
Greetings Tom:
Tom Christiansen wrote in message <6bqpkq$l7c$2@csnews.cs.colorado.edu>...
> % man perlfaq4
> % man perlfaq6
I don't have access to telnet in order to look at manual pages. Can you
point me to a web page?
Thank you.
--
===========================================================
Peter Perchansky, Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Internet Programming, Web Site Promotion, and more
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm
------------------------------
Date: 11 Feb 1998 01:31:01 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: ? Regular Expressions ?
Message-Id: <6bqv0l$4gp$6@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Peter Perchansky" <fp@pmpcs.com> writes:
:> % man perlfaq4
:> % man perlfaq6
:I don't have access to telnet in order to look at manual pages. Can you
:point me to a web page?
Telnet? Telnet?? What in the name of Dennis does telnet have to
with your ability to read documentation?
All Perl distributions come with complete manpages. If you have Perl,
you have its documentation. If you don't have its documentation, you
don't have Perl. It just might not be found via a program called "man".
Check your distribution's README or installation notes. It's all there,
or it's not Perl.
There are old stale don't-read-me versions on the web via www.perl.com,
but the web is not the answer to your problems. Learning to use the
documentation you already have, is.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
But you have to allow a little for the desire to evangelize when you
think you have good news.
--Larry Wall in <1992Aug26.184221.29627@netlabs.com>
------------------------------
Date: 11 Feb 1998 01:32:53 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: array question
Message-Id: <6bqv45$4gp$7@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, shaug@callamer.com (O'Shaughnessy Evans) writes:
:So, then, I now have a question; would someone please
:confirm whether I have these right?
Basically.
: # All memory
: # that was associated with it has effectively
: # been released.
That depends what you mean by released. It's still in your address space.
You cannot hope to free memory in the negative sbrk sense of returning to the
virtual memory system whence it came.
-tom
--
Tom Christiansen tchrist@jhereg.perl.com
"You're flame-proof in the same sense that certain plastics are fluorine-proof."
--Larry Wall
------------------------------
Date: 11 Feb 1998 01:07:08 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Best way to test for binary data?
Message-Id: <6bqtjs$t5t$9@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using that lying and broken non-newsreader, Mozilla/4.0 (compatible;
MSIE 4.01; Windows NT), jase@cadence.com writes in comp.lang.perl.misc:
:So right now, I'm just checking for the presence of a NULL character
:(000 in octal). If found, I assume it's binary data. There's certainly
:better ways to do this, so please let me know..! :-)
I think that's probably best. On some stdio implementations, you can
also use the -T and -B file-test operators on filehandles instead of
on filenames.
Of course, once you start making the distinction, you're already lost. :-)
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Yes, you can think of almost everything as a function, but this may upset
your wife." --Larry Wall
------------------------------
Date: 11 Feb 1998 01:27:18 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Control a serial device with Perl
Message-Id: <6bqupm$4gp$5@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Muriel & Dirk O. Wolbeck" <Wolbeck@WriteMe.com> writes:
(or was that dirk@wolbeck.de ?)
:I want control a serial device (connected to my Linux box) with Perl. I
:heard that all I have to do is to open the device as a file and use write
:and read operations to access the serial device like a modem.
Did you read the faq entry about this?
% man perlfaq8
How do I read and write the serial port?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
If you want to see useful Perl examples, we can certainly arrange to have
comp.lang.misc flooded with them, but I don't think that would help the
advance of civilization. :-) --Larry Wall in <1992Mar5.180926.19041@netlabs.com>
------------------------------
Date: 11 Feb 1998 01:01:26 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: debugging perl script
Message-Id: <6bqt96$t5t$7@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Ian Samson" <IDSamson@Beauty.HSRC.ac.za> writes:
:Hi. I have a rather long (271 lines) script to mail questionnaire results.
:Each time I test it in the browser, I get a message that says "The server
:returned an invalid or unrecognized response". How do I find out which line
:is causing the error?
By posting to the right newsgroup? By reading the idiot's guide to
debugging CGI problems?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
If the code and the comments disagree, then both are probably wrong.
--Norm Schryer
------------------------------
Date: Tue, 10 Feb 1998 19:36:30 -0500
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Delays of less than a second?
Message-Id: <34E0F28E.BE2FB28@negia.net>
Peter Holfelder wrote:
>
> Is there a way I can set a delay of less than one second? I'm using
> sleep now, but I really shouldn't be delaying for a second or more...
sure. check out 'perldoc -f select'. it has an artifact, useful for
such things.
--
danboo rstein
------------------------------
Date: 11 Feb 1998 01:04:34 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: From another wingeing newbie
Message-Id: <6bqtf2$t5t$8@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using that tool of corruption and software flatulence Mozilla 4.04 [en]
(Win95; I), and an obfuscated return address now revealed for all the
world to grep out and add to spam lists, matt.pryor@dial.pipex.com writes
in comp.lang.perl.misc:
:I'm brand new to Perl. Found some excellent resources on the www and in
:the
:documents accompanying the binary, however I'm still a little stumped on
:one
:issue and wonder if anyone can point me in the right direction to find
:the answer.
I think your browser is misconfigured. Look at those bad wraps!
Have you looked at www.perl.com?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Just because you're into control doesn't mean you're in control."
--Larry Wall
------------------------------
Date: Wed, 11 Feb 1998 01:11:45 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Hashes Usage
Message-Id: <34e1e7eb.992818@flood.xnet.com>
Holly Sommer <SNIPhsommer@micro.ti.comSNIP> wrote:
>Let me preface by saying I have primarily a C background, so I'm still
>in the process of learning to deal with common programming elements in
>the correct vernacular.
>
>I've got a text file which will be altered by numerous people -
>essentially, I have a flatfile dB file, with entries which consist of
>a fixed number of fields (key-value pairs).
>
>It makes sense to reference the information in this dB file (and search
>across it) by using hashes. Now, I know how to do this with structs in
>C, but am at a bit of a loss figuring out how to dynamically (or, "on-
>the-fly") generate/read/initialize hashes.
>
>In looking through the blue camel book, pages 270 - 271 seem to delve
>into this matter. However, the examples given operate in examples where
>the data being stuck into the hashes is known ahead of time, and I'm
>dealing with a dynamically-changing dB, so it's a little bit different.
>
>The setup, then, looks like this (to simplify):
>
>+--------- dB file -------+
>| Field1: Value1 |
>| Field2: Value2 |
>| Field3: Value3 |
>| Field4: Value4 |
>| Field5: Value5 |
>| End |
>~ repeats, with second ~
>~ entry in the dB file ~
>+-------------------------+
>
>For each entry, "Value1" is unique, so I figured that would make a good
>key for referencing elements of this hash. However, I am uncertain
>of how to access the elements for each entry. In C, it would look
>like:
>
> Value1.Field2 = Value2;
> (assigning Value2 to Field2 in the Value1 instance of this struct -
> where Value1 is being used as the name of this instance).
>
>How would I initialize and reference this with hashes in perl?
I use a hash of hashes with an array of keys because it is easier to
keep or free up at will than an array of miscellanious hashes all over
the place. Following is based on 'append new members' page 271.
Once you split a record into $value1, $value2, $value3, ...
push @HoHkeys, $value1;
%rec = (
Value2 => $value2,
Value3 => $value3,
);
for $what (keys %rec) {
$HoH{$value1}{$what} = $rec{$what};
}
The @HoHkeys can be used to maintain or reorganize order or loop
through the whole list. If you want to reuse it for another file you
can get rid of the whole thing with:
@HoHkeys = (); undef %HoH;
David Efflandt/Elgin, IL USA
efflandt@xnet.com http://www.xnet.com/~efflandt/
------------------------------
Date: 11 Feb 1998 01:16:48 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: HELP - MULTIPLE LEVEL SORT?
Message-Id: <6bqu60$4gp$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, John Grubb <jgrubb@gte.net> writes using that
broken excuse for a newsreader, Mozilla 4.02 [en] (WinNT; I):
That's a terrible subject. Just terrible. You were killfiled
long ago. I'm just cleaning out the crap today.
:Can some one tell me how to perform multiple level sorts on a text data
:file? I write to a pipe (|) delimited text file, including
:$day|$month|$year|$time.
That's pipe-separated, not pipe delimited.
I want to sort the entries by date, then time.
:I am using the following to do a time-based sort, now, but I want to add
:a date-based sort to it. Will I have to create a seperate TEMP file for
[sic]
:each date?:
:
: &GetFileLock ("$lock_file");
I don't trust that call. Why are you quoting the variable?
Are you sure you understand locking?
Anyway, to answer your question, have you looked into perlfunc about sort?
Why don't you try the standard sort program? Oh, I forgot. You're on
that programmer-hostile system. Well, so it goes.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Fungus doesn't take a vacation. --Rob Pike
------------------------------
Date: 11 Feb 1998 00:49:32 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How generate counter?
Message-Id: <6bqsis$t5t$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, jzhuang@ringer.cs.utsa.edu (Jun Zhuang) writes:
:I try to generate a counter by calling: counter.cgi
Then post to a CGI group.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"The social dynamics of the net are a direct consequence of the fact
that nobody has yet developed a Remote Strangulation Protocol."
--Larry Wall
------------------------------
Date: 11 Feb 1998 01:20:09 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How to "override" modules with -MModule ?
Message-Id: <6bquc9$r4g$3@comdyn.comdyn.com.au>
In article <6bqq6b$ec3@nwd2nws1.analog.com>,
bryan@spd.analog.com (Bryan Bayerdorffer @ Wit's End) writes:
>
> I have a skeleton Perl program, written as a set of modules/files, say A.pl,
> B.pm, C.pm. Now, I want other folks to be able to replace C.pm with their own
> modules (say X.pm and Y.pm) WITHOUT having to modify A.pl or B.pm. The only
> thing they should have to worry about is that X and Y export the same
> symbols that C exports.
The best way to do this is to have these people inherit everything
from your module. Of course, you will need to write your module the
right way for people to be able to do that.
perldoc perltoot
perldoc perlobj
perldoc perlmod
All of the above should tell you how to do that.
Alternatively, they can copy the module into a different directory,
edit it, and make sure that that directory appears in @INC before the
directory where your lives. But that's not as nice.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Advertising: The science of arresting
Commercial Dynamics Pty. Ltd. | the human intelligence long enough to
NSW, Australia | get money from it.
------------------------------
Date: 11 Feb 1998 01:11:21 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to write a perl module
Message-Id: <6bqtrp$t5t$10@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using that unconscionably stillborn excuse for a newsreader, Mozilla/4.04
[en] (WinNT; I), carloshd@hotmail.com writes in comp.lang.perl.misc,
: I'm a perl rookie trying to write a module with some custom functions;
:but I can't find information or examples on how to write a module. Can
:anyone tell me where to find the info or a quick tip on how to write
:them.
The standard treatise is given in
% man perlmod
But you might also check the FAQs.
:I'm running perl on WinNT4.0 (Perl5.003_07 ActiveState Port).
You could have just said "Lasciate ogni speranza, voi ch'entrate!"
and been done with it. :-(
If you won't install a real operating system, at least look into a
real port. See the http://www.perl.com/CPAN/ports/win32/Standard and
perhaps http://www.perl.com/latest.html for the difference between
what you're using and that one.
Being a willing or unwilling victim of Monoposoft is no excuse for
ignorance of the standard documentation.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Most of what I've learned over the years has come from signatures."
--Larry Wall
------------------------------
Date: 11 Feb 1998 01:08:37 GMT
From: Cameron Kaiser <cdkaiser@delete.these.four.words.concentric.net>
Subject: Re: Huge arrays: 'Out of Memory'
Message-Id: <6bqtml$sha@examiner.concentric.net>
Tom Christiansen <tchrist@mox.perl.com> writes:
>You might investigate the $^M variable in recent releases, but I really
>would not count on it. Better that you should find a scalable solution.
This is something I'm curious about too. This time, I really did read part
of Programming Perl :-). Would this error call $SIG{__DIE__}, even though the
error listing in the back calls it 'non-trappable'? Do trappable errors
trigger it too? I read the thread about signal handling, but for purposes of
my curiosity let's assume that they work correctly (dangerous).
--
Cameron Kaiser
cdkaiser at concentric dot net (it hasn't helped the spam yet though)
*** visit the Spectre Server at www.sserv.com
*** C64 software lives! www.computerworkshops.home.ml.org
------------------------------
Date: Tue, 10 Feb 1998 19:57:52 -0500
From: Bob Trieger <corky@ultranet.com>
To: "James L. Taylor" <cowboy@cnnw.net>
Subject: Re: Learning Perl
Message-Id: <34E0F790.4167@ultranet.com>
James L. Taylor wrote:
>
> Hi All,
>
> Ok I'm getting confused here as to where I should start. I am a total
> Rookie to all of this and I know nothing..I dont know C, C++, Unix or
> any of it....where do I start? I have several books that I purchased
> and not sure what one to start with, I have Learning Perl, Programming
> Perl, CGI Progamming, and Teach yourself CGI Programming with Perl 5,
>
> I'm reading Programming Perl at the moment and I am understanding some
> but not all of it, I do the excercises in the book and they eventually
> work when I figure out what I have done wrong, but the symbols, codes,
> syntax's whatever they are called, I don't understand what they mean
> or how they are used, some of it is explained and what they mean, but
> this old dog isn't grasping alot of it...is this the book I need to
> BEGIN with or am I to far ahead of myself??
>
> James L. Taylor
Start with Learning perl and then move onto Programming perl. Until you
have a good grasp on perl, stay away from anything that says "cgi" or
"web".
------------------------------
Date: Wed, 11 Feb 1998 01:08:00 GMT
From: FHeasley@chemistry.com (Frank)
Subject: Re: Matt's Script Archive
Message-Id: <34e0d3f8.29487626@news.halcyon.com>
On Tue, 10 Feb 1998 21:46:53 GMT, cowboy@cnnw.net (James L. Taylor)
wrote:
>I have used Matt's "FREE" script's, and I use his guest book on one of
>my web pages and I have never had a problem with it, as a matter of
>fact that script is what has made me want to learn perl, I have also
>check out and played with other scripts that he has written and
>haven't found any problems with them, I don't know much about perl at
>all but just looking at how he has written tham has taught me some
>good things...I think what Matt is doing is great and I hope he keeps
>up what he is doing.
I agree. For a teenager, Matt has done an outstanding job of putting
together programs that many people find useful. I particularly
appreciate the thought he's put into the concepts and design of his
programs. Even though there may be problems with some of the code,
they are easily correctable while maintaining the original framework.
I also think that his placing his work in the public domain is a
commendable act of real altruism, very much in the "open architecture"
spirit of perl and the internet, if not the web as a whole.
Frank
------------------------------
Date: 11 Feb 1998 01:23:55 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Newbie:Perl Modules
Message-Id: <6bqujb$4gp$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Mike Ware" <Mike.ware@gbjha.zeneca.com> writes:
:I'm new to perl and trying to use some of the perl modules suplied with the
:install of perl, which is version 5.003_07 by ActiveWare on an NT4 server.
Some sins carry their own punishments. Using programmer-hostile
Microsoft crapware is one such.
:however when I try to write a script which uses a module e.g the
:file:copy.pm I am returned the error "Unable to locate copy.pm in @INC"
The module is not called 'copy.pm', nor 'file::copy.pm'. It is
called File::Copy, and if you use like this:
use File::Copy;
It is, however, woefully inadequate in its reporting of errors.
You can't tell which file triggered the problem.
:even if I push the path onto the INC array at the beginning of the script.
:I am obviously missing something simple here. So forgive my stupidity and
:HELP!!
Don't shout. You are forgetting that Perl's identifiers are
case-compassionate. Go with the flow.
And you didn't read the FAQ about why your push is use-less.
% man perlfaq8
How do I keep my own module/library directory?
How do I add a directory to my include path at runtime?
Being a Prisoner of $Bill is no excuse for ignorance of the FAQ.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
> (It's sorta like sed, but not. It's sorta like awk, but not. etc.)
Guilty as charged. Perl is happily ugly, and happily derivative.
--Larry Wall in <1992Aug26.184221.29627@netlabs.com>
------------------------------
Date: Wed, 11 Feb 1998 01:11:44 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Pasting to STDIN
Message-Id: <34e0e455.74916@flood.xnet.com>
Steve Verros <verros@sicom.com> wrote:
>Anyone experiance loss of input data when pasting a large amount of
>data into terminal (solaris) window running a perl script looking for
>STDIN data?
>
>Try running the following in a shell, paste a big chunk of data into
>the shell then compare the contents of temp with the original.
>
>#!/apps/perl/bin/perl
>open (Temp, "> temp");
>while (<>) {
> print Temp;
>}
>close Temp;
Or more simply:
#!/apps/perl/bin/perl
open (Temp, "> temp");
print Temp <>;
close Temp;
I doubt if it is related to Perl. I have heard of people complaining
that they lose data when doing a long 'ls' in a telnet session. I
didn't catch the cause though (mismatched communication speeds?).
Either of these works in Linux xterm. But I am not sure how to cut &
paste more than a page of data and you have not defined 'big chunk'.
David Efflandt/Elgin, IL USA
efflandt@xnet.com http://www.xnet.com/~efflandt/
------------------------------
Date: 11 Feb 1998 00:50:39 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: perl form problem
Message-Id: <6bqskv$t5t$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using Lucifer's own web browser, Mozilla 4.04 [en] (WinNT; I),
Brian Charles <charlesb@ccmail.orst.edu> mistakenly wrote in
comp.lang.perl.misc:
: Can anyone look at the program below and tell me what's wrong. I'm a
:newbie to PERL. I want this program to take input (name and email) from
:a form and write it to a file which is then sorted and printed in html.
Please try posting to a CGI newsgroup.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
It's documented in The Book, somewhere...
--Larry Wall in <10502@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 11 Feb 1998 00:59:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl HTML output in Win 95
Message-Id: <6bqt4m$t5t$6@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, using a forged address now revealed for all the
world to grep, intervisors@intervisors.nl writes using the asquerous
Forte Free Agent 1.1/32.230:
:I've been programming in Perl under Unix for quite some time. To save
:communication costs to our server from Home and for speed I decided to
:install the Microsoft Personal Web server 4 and the latest build of
:Perl for win 32 on my windows 95 machine.
You've utterly and totally lost me here. What costs? Why not just
install an operating system instead of a primitive program loader with
a broken GUI? :-)
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
sum to check equivalent files should use sum -a. --Andrew Hume
------------------------------
Date: 11 Feb 1998 01:39:49 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl lessons Hong Kong
Message-Id: <6bqvh5$4gp$9@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, using a forged address now revealed for all to
read and grep and spam, jys@hk.super.net writes:
:I would like to take private lessons in Perl and C programming (advanced
:programming - I know the basics). I am situated in Hong Kong.
Ouch. That's a long ways away. Have you looked at
http://www.perl.com/perl/info/training.html
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Sorry. My testing organization is either too small, or too large, depending
on how you look at it. :-)
--Larry Wall in <1991Apr22.175438.8564@jpl-devvax.jpl.nasa.gov>
------------------------------
Date: 11 Feb 1998 00:53:28 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl problems with anonymous users
Message-Id: <6bqsq8$t5t$5@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, rgram@ingr.com writes using the risible excuse
for a newsreader, Mozilla 3.04 (WinNT; I):
:I currently am running a intranet with ISS 3.0 on a Windows NT 4.0
:server.
Well, even assuming that I believe in intranets (I don't), I'm
still sorry for you.
>Currently the server is configured in ISS to allow both BASIC
:authentication and anonymous logins. The web pages that use BASIC
:authentication have no trouble running perl correctly it is the
:anonymous page I am having trouble with.
You are not having a perl problem. You are having a browser problem,
a server problem, or a satanspawn, er, $bill problem. There are
other newsgroups to cover that. Grep in your newsgroups file
for the relevant keywords.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Besides, it's good to force C programmers to use the toolbox occasionally. :-)
--Larry Wall in <1991May31.181659.28817@jpl-devvax.jpl.nasa.gov>
------------------------------
Date: 11 Feb 1998 01:37:55 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: polyform error
Message-Id: <6bqvdj$4gp$8@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, admin@mail.y-net.com.au writes:
:I have a nt4 operating system and
I'm sorry.
:option pack 4.I loaded polyform into
:my inetpub/scripts file.The problem I am having is that every time I
:tried to submite an application an error 500,documents contians no data
:or HTTP Error 405
If you read perlfaq9, it would point you to the right place, which,
you'll soon learn, would be some newsgroup treating with CGI or your
aborted excuse for an operating system.
500 SERVER ERROR is apt to get you talked about. It's utterly unrelated
to Perl. I will follow up this message with the idiot's guide.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
If I had only known, I would have been a locksmith. --Albert Einstein
------------------------------
Date: 11 Feb 1998 01:09:13 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: Problems installing DBI on Win 95
Message-Id: <6bqtnp$ajg@srvr1.engin.umich.edu>
[ mailed and posted ]
In article <34dfae64.8976066@news.crosslink.net>,
Scott D. Gregory <sgregory@crosslink.net> wrote:
>
>I am having the following problem installing DBI under Win 95.
[..a whole bunch of problems building extensions snipped..]
Building extensions on Windows 95 is, umm, what's the word,
unsupported.
I hear you can make it work if you use 4DOS/NT and dmake.
Don't forget to change 'nmake' to 'dmake' in Config.pm,
if you decide to try that.
- Sarathy.
gsar@umich.edu
------------------------------
Date: 11 Feb 1998 00:46:55 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: Rounding Off Decimal Numbers
Message-Id: <slrn6e1t2d.2ai.gabor@vnode.vmunix.com>
In comp.lang.perl.misc, Lachlan Dunlop <lach@lach.net> wrote :
# how about... printf("%8.2f", $value);
# or
# $value = sprintf("%8.2f", $value);
This doesn't quite give the requested value. You first have to add
0.005.
$_ = 57.788;
$_ += 0.005;
printf "%.2f\n",$_;
# > I was wondering if someone could give me a hand. I've been trying to get
# > a decimal number such as 57.788 to come out as 57.79. I'm having a hard
# > time getting this to work. It's for a shopping cart that I'm working on
# > and I can't get the final price to come out rounded off after the tax,
# > which ususally ends up being some mega-digited number, is added in.
# >
# > I've tried using the Floating-Point Math Package, but with no luck. I'm
# > just learning Perl now and got stuck on this point. Any help that anyone
# > could offer would be greatly appreciated.
gabor.
--
Q. Why is this so clumsy?
A. The trick is to use Perl's strengths rather than its weaknesses.
-- Larry Wall in <8225@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 11 Feb 1998 01:25:26 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: sorting an associative array
Message-Id: <6bqum6$4gp$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using the aborted excuse for a newsreader, Microsoft Outlook Express
4.71.1712.3, poor "Hans Van Lint" <hvanlint@lodestar.be> writes in
comp.lang.perl.misc:
:How can I sort an associative array ascending by keys, and still use it as
:an associative array (sorted on key).
Precisely the way perlfaq4 tells you, or perlfunc in the keys entry.
That will be $195/Microsoft help call, thank you very much.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Even if you do learn to speak correct English, whom are you going to
speak it to?
--Clarence Darrow
------------------------------
Date: 11 Feb 1998 00:48:52 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: SYSTEM command - How do you return data to the browser?
Message-Id: <6bqshk$t5t$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using the demonic abomination Microsoft Outlook Express 4.71.1712.3,
"Rick Ryan" <rickryan@datrixnet.com> writes in comp.lang.perl.misc:
:I'm using the SYSTEM command
No, you're using system()
:to run an external .exe file on my NT server.
I'm very sorry to hear that.
:Is there any way to have the output of the called program return directly to
:the browser or back to my perl script?
Oh probably. Try
% man perlfaq8
...
Why can't I get the output of a command with system()?
Even devilspawn have to read the FAQ.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Unix is like a toll road on which you have to stop every 50 feet to
pay another nickel. But hey! You only feel 5 cents poorer each time.
--Larry Wall in <1992Aug13.192357.15731@netlabs.com>
------------------------------
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 1854
**************************************