[8484] in Perl-Users-Digest
Perl-Users Digest, Issue: 2101 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 15 04:07:25 1998
Date: Sun, 15 Mar 98 01:00:33 -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 Sun, 15 Mar 1998 Volume: 8 Number: 2101
Today's topics:
Re: "Learning Perl" questions and frustrations (Lanning)
Re: complex reg expression help <rjk@coos.dartmouth.edu>
Re: complex reg expression help <rjk@coos.dartmouth.edu>
Re: Does not work on NT (perl -e) <dave@turfpit.demon.co.uk>
Re: Getting Remote File Size <jesse@savalas.com>
Re: Getting Remote File Size <uri@sysarch.com>
Re: Help sought with web programming security problem (Martin Vorlaender)
Help with "stat FILENAME" and "-X FILENAME" <mdanna@ghg.net>
How to print a text file? <rossen@hikari-jhs.yamaguchi-u.ac.jp>
Re: Is there a "Newsgroup" for Newbies to Perl? (I R A Aggie)
Re: Is there a "Newsgroup" for Newbies to Perl? (Mark W. Schumann)
Perl 5 installation <michboy@caspers.net>
Re: Perl 5 installation <aprilk@dancris.com>
Re: Perl4 vs Perl 5 (A. Deckers)
Re: Problem stripping Mac headers off of GIF's <rjk@coos.dartmouth.edu>
Re: Problem stripping Mac headers off of GIF's <rjk@coos.dartmouth.edu>
Pulling text from a URL (James)
Re: Pulling text from a URL (I R A Aggie)
Re: regexp list context substitution <rjk@coos.dartmouth.edu>
Re: sockets (Michael Fuhr)
Re: User-interface Quandary <tchrist@mox.perl.com>
Re: Where can I get the PERL for Windows NT and 95? <sb@sdm.de>
Writing Scripts <michboy@caspers.net>
Re: You have 1 message(s) - how to print plurals? <NerveGas@see_signature.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 15 Mar 1998 03:55:19 GMT
From: slanning@buphy.bu.edu (Lanning)
Subject: Re: "Learning Perl" questions and frustrations
Message-Id: <6efjf7$l8l$1@news1.bu.edu>
[some snippage and piggybacking on Les' message--hope you don't mind]
: David Pinkerton wrote in message <34ee3454.50494916@news.csrlink.net>
: >$name = <STDIN>;
: >chomp ($name);
: >
: >and here is the error I receive:
: >
: >syntax error in file hello.sh at line 5, next 2 tokens "chomp ("
: >Execution of hello.sh aborted due to compilation errors.
: >
: >*Luckily* I happened to read (somewhere else) that "chop" can be
: >substitued for "chomp." So far this has worked but can anyone
: >tell me why "chomp" will not work?
A few people responded to this saying that he should get Perl5,
but I have Perl 5.004 and encountered the same problem (used
chomp and got a very similar error message). And, you know what?
The same solution worked; i.e., I substituted chop for chomp
and everything was hunky-dorey.
Then, instead of running my script using the scriptname (say
script.pl) and the shebang line--typing "script.pl" at the
prompt--I tried typing "perl script.pl", and it magically
worked even with chomp. I concluded that I'm just not familiar
enough with Unix (I had the same problem with my shell scripts),
and postulated that it has something to do with a difference
in where Perl thinks the standard input has been directed (but
why does chop handle it?) and where I think it's been directed
(and I know it's something to do with that damned shebang line).
I was just too intimidated about asking before, lest some
guru (say, Tom) should tell me to RTFM when I've already RTFM.
Any help would be appreciated as I have this problem in all
my Unix scripts.
-- Lanning
------------------------------
Date: Sat, 14 Mar 1998 18:58:32 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: complex reg expression help
Message-Id: <350B19A9.BCF70D81@coos.dartmouth.edu>
Sameer Anand Siruguri wrote:
>
> > foreach $value (@reg){$_ =~ s/\b\Q$value\E\b/ $value /g};
>
> 1. You mean \q{$value} instead of \Q\E. \Q\E quotes regular exp
> metacharacters, not all "metacharacters".
What are you babbling about?
First, there is no such escape sequence as '\q'.
DB<1> p "\qa;b,c"
qa;b,c
Second, even if \q was significant, it certainly wouldn't involve curly
braces, which would be interpreted as literal characters in the regex.
Third, \Q\E *does* escape all metacharacters (metacharacters meaning
non-alphanumeric characters).
>From the description of quotemeta in perlfunc:
Returns the value of EXPR with with all non-alphanumeric characters
backslashed. (That is, all characters not matching /[A-Za-z_0-9]/
will be preceded by a backslash in the returned string, regardless
of any locale settings.) This is the internal function implementing
the \Q escape in double-quoted strings.
Unfortunately, earlier versions of the documentation did refer to 'regular
expression metacharacters' instead of 'non-alphanumeric characters'. That was
a bug in the documentation, however; \Q and quotemeta have always escaped all
non-alphanumeric characters.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 14 Mar 1998 19:03:49 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: complex reg expression help
Message-Id: <350B1AE6.3AC15203@coos.dartmouth.edu>
Sameer Anand Siruguri wrote:
>
> On Wed, 04 Mar 1998 23:16:18 -0600, Mike Binkley wrote:
> > foreach $value (@reg){$_ =~ s/\b\Q$value\E\b/ $value /g};
>
> 2. There doesn't seem to be any point to looping, because since $_ is modified
> with =~, the next modification will probably not have any effect, unless the
> elements of @reg are such that there will be some kind of incremental
> substitution.
More nonsense...
DB<1> $_ = ".foo.bar.foo.bar.\n"
DB<2> @reg = qw(foo bar)
DB<3> print; foreach $value (@reg){s/\b\Q$value\E\b/ $value /g; print}
.foo.bar.foo.bar.
. foo .bar. foo .bar.
. foo . bar . foo . bar .
As you can clearly see, $_ is modified each time through the loop, as you
would expect.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 15 Mar 1998 01:01:53 +0000
From: David Richards <dave@turfpit.demon.co.uk>
Subject: Re: Does not work on NT (perl -e)
Message-Id: <350B2881.7BF4C964@turfpit.demon.co.uk>
Use
perl -e "print \"kdkdk\n\""
Thats a double quote at the start and end instead of the single quote.
\" gives a " inside quotes.
All to do with the command interpreter in NT.
David
> The following does not work on NT4.0 with perl5, but it works on unix
> just fine.
>
>
> perl -e 'print "kdkdk\n"'
> Can't find string terminator "'" anywhere before EOF at -e line 1.
------------------------------
Date: Sat, 14 Mar 1998 19:12:04 -0800
From: Jesse Rosenberger <jesse@savalas.com>
Subject: Re: Getting Remote File Size
Message-Id: <6efgqb$gau@bgtnsc02.worldnet.att.net>
Well, I have spent the last couple hours searching around perl.com...but
have failed to figure out how to get perl to open a REMOTE url, and find
the size it in bytes, then I want to have the size printed out to the
users browser? does anyone have any ideas besides perl.com...or if
that's all they have...exactly what section of perl.com should I be
looking in, although I have looked through most of it already.
Thanx,
Jesse Rosenberger
Sneex wrote:
> Posted and Mailed:
>
> A quick answer is to ftp over to www.perl.com
> and look for isize.
>
> HTH,
> Sneex :)
>
> Jesse Rosenberger wrote:
>
> > How would you go about writing a perl script that would open a
> remote
> > image (from a url: ex. http://www.yourdomain.com/myimage.gif) and
> and
> > get a local perl script to get the file size (in bytes) and print it
> out
> >
> > to the browser? If someone could provide an example of how to do
> > this...it would be greatly appreciated. Thanks in advance.
> >
> > Thanx,
> > Jesse Rosenberger
> > Webmaster - Savalas Productions, Inc.
> > http://www.savalas.com
> > webmaster@savalas.com
------------------------------
Date: 15 Mar 1998 00:29:00 -0500
From: Uri Guttman <uri@sysarch.com>
To: Jesse Rosenberger <jesse@savalas.com>
Subject: Re: Getting Remote File Size
Message-Id: <x7en04y12b.fsf@sysarch.com>
Jesse Rosenberger <jesse@savalas.com> writes:
> Well, I have spent the last couple hours searching around perl.com...but
> have failed to figure out how to get perl to open a REMOTE url, and find
> the size it in bytes, then I want to have the size printed out to the
> users browser? does anyone have any ideas besides perl.com...or if
> that's all they have...exactly what section of perl.com should I be
> looking in, although I have looked through most of it already.
>
> Sneex wrote:
>
> > Posted and Mailed:
> >
> > A quick answer is to ftp over to www.perl.com
> > and look for isize.
i think sneex means the Image::Size module which analyzes image files
and returns their x,y sizes. the original poster wants the size of the
file itself and the file is remote. this cannot be done directly. you
need to get a directory listing (for ftp) or get the file for http. http
doesn't support getting just the size of a file.
so this is not a perl question and should be asked in some group like
comp.infosystems.www.authoring.cgi
hth,
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
uri@sysarch.com Have Perl, Will Hack
http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: Sun, 15 Mar 1998 01:29:16 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Help sought with web programming security problem
Message-Id: <350b20dc.524144494f47414741@radiogaga.harz.de>
[NGs narrowed to comp.lang.perl.misc]
Andrew Rothman (Andrew_B._Rothman/SRCMN@srcinc-mn.com) wrote:
: One answer off the top of my head is to make the GIF dynamic. Off the
: top of my head, here's a suggestion. Using SSI, put the current time and
: date at the top of the page. Have the PERL (See, Steve?) CGI program
: return a built-on-the-fly GIF with the time and date in it (see almost
: any web counter CGI for how to imbed numbers in a GIF).
Or look at Randal Schwartz' WebTechniques column #13 at
http://www.stonehenge.com/merlyn/WebTechniques/col13.html
on how to use the GD module to build GIF counters on the fly.
: Tell users that
: date and time must match (and must be the real date and time) or the
: page is fake.
Excellent idea, indeed. Not non-fakeable, but an increased amount of work
for the copy-hacker.
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: Sat, 14 Mar 1998 18:51:33 -0600
From: "Mark J. Danna" <mdanna@ghg.net>
Subject: Help with "stat FILENAME" and "-X FILENAME"
Message-Id: <350b285b.0@news.ghgcorp.com>
For Win-32, Is there a function that returns the file atime, mtime, or ctime
without having to factor in the time since the epoch (00:00 January 1, 1970
GMT)? stat FILEHANDLE and -X FILEHANDLE don't seem to return the value
directly.
I would image that there is a function that would return something similar
to a Directory listing or Explorer listing, since the system (Win95 and NT)
already knows the respective dates/file info.
P.S. I am a novice programmer and I have done research in FAQ's, and the
O'Reilly books and other, but can't seem to find the answer I am seeking.
Any positive help, encouragement, and sample code would be greatly
appreciated.
Thanks,
Mark
mdanna@ghg.net
------------------------------
Date: Sun, 15 Mar 1998 12:04:29 +0900
From: Rossen Mikhov <rossen@hikari-jhs.yamaguchi-u.ac.jp>
Subject: How to print a text file?
Message-Id: <350B453D.8571A339@hikari-jhs.yamaguchi-u.ac.jp>
Hello. I have a problem and I would very much appreciate an advice.
I would like to print a text file from a Perl script but all the
variables to be interpolated. This is my script
--------------
myscript.pl
--------------
$variable = "MyVar";
open (MYFILE, "myfile.txt");
#I don't know what to put here, to substitute print MYFILE;
close MYFILE;
--------------
myfile.txt
--------------
My text has $variable
Thanks in advance.
Rossen.
------------------------------
Date: Sat, 14 Mar 1998 22:21:24 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <fl_aggie-1403982221250001@aggie.coaps.fsu.edu>
In article <6eedr2$b6m@newsops.execpc.com>, Mark Stackhouse
<stackhou@execpc.com> wrote:
+ Take a few minutes and query the posts here using the words Newbie, Help and
+ Please.
Here are a few words for you newbies:
Thank you/Thanks in advance.
I read perlfaq about this, and I still don't understand.
The docs say this, and when I try it, I get that. Why?
+ How dare you judge someone's worth or initiative by the way they
+ "phrase" a question.
How dare they impose upon my time by issuing poorly phrased questions
that are ambigious, requiring me to become a mind reader. Of course,
if everyone refused to even attempt an answer, the newbie would come
back with "Why doesn't anyone answer my questions? you bunch of elitist
snobs!"
Puts right back at square 0.
+ s/^\\$a/\x\\$a/g;
This is why I have a copy of "Mastering Regular Expressions" on my desk.
+ A few "hackles" have been raised the last couple of days... exactly my
+ intention. The subject of curt replies to those
+ genuinely seeking advice needed to be addressed.
Which part of "Usenet helps them that helps themselves" do you have
a problem with?
+ One last thought... when you were first learning how to ride a bike, did you
+ do it ALL ON YOUR OWN, or did someone hang on to the back of the seat for
+ awhile? Newbies just need a little help... until they learn how to balance
+ on there own!
These newbies (for the most part) aren't children. Most know how to
read, many have college courses under their belts.
The ones that get their butts flamed are the ones that WON'T READ THE
FINE DOCUMENTATION INCLUDED WITH EVERY DISTRIBUTION OF PERL. They can't
be bothered to go out and buy the Llama or the Camel and _use_ them.
They don't know how to use 'perldoc', or find and install 'perlindex'.
They deserve what they get. Surely they learned how to use an index
in grade school.
You want to know how I learned perl, Mark? I already had close to 10 years
experience with fortran, so I knew how to think about algorithms. I needed
something to handle "strangely" formatted text data files -- comma or
tab seperated files which would be bears to handle in fortran.
I, personally, bought a first edition Llama book, and sat down with it
_away_ from a computer, and read the first three chapters, going over
the parts I didn't understand. I went and typed in the examples, and
played with them. I continued thru the rest of the book, and within a
week, I was writting crude, but working programs that saved me hours of
boring, mind-numbing grunt work. I don't think my boss ever understood
that, even as he chided me for "wasting" time learning a new language.
I have copies of the Llama, the Camel, and the Panther books sitting on
my desk. Why? because its quicker and easier for me to reach over, flip
to the index and start searching for the information I seek than it would
be to formulate a question, post it to Usenet, wait however long it takes
to get somewhere, get answered and get back to me.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: 14 Mar 1998 23:35:21 -0500
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6eflq9$m8i@junior.apk.net>
In article <3509b584.19396625@newsvr>,
Nicholas Carey <a-bnc@microsoft.com> wrote:
>Answering the same question over and over again is *really*
>wearying . Have you ever worked a helpdesk? The burnout level is
>as high as it is for good reason.
[To comment in agreement:]
You get paid for working a helpdesk.
Depending on the nature of the helpdesk, there may not even *be*
an appropriate FAQ document, so you can't really blame newbies for
failing to read it.
And turnover is *still* high on helpdesks. The wizards and oldtimers
here don't get paid, and have already provided a darned good FAQ
document. So you can understand their impatience even more.
>A *lot* of work has gone into producing Perl's plethora of
>documentation. It may not be the most usable documentation set on
>the planet -- but... [snip]
Frankly, I think it's quite good. Maybe it appears that way to me
because I was already an experienced programmer before Perl caught my
attention. The docs may not look so friendly to someone who doesn't
already program or who doesn't primarily use Unix.
--
Mark W. Schumann | catfood@apk.net
Why should I change or hide my return address to deter spammers?
I just loop the garbage right back at 'em.
------------------------------
Date: Sat, 14 Mar 1998 18:46:09 -0700
From: "Steve Peters" <michboy@caspers.net>
Subject: Perl 5 installation
Message-Id: <01bd4fb2$c8cb94c0$a12f8dcf@default>
I am trying to install Perl 5 on my system, so I went to
http://www.perl.com/ and downloaded a file called latest_tar.tar. It
downloaded successfully and I tried to extract it using WinZip. After I
click on "Open" and find the file, it quickly says "Error reading header
after processing 0 entries". I click "Ok" and it says "Invalid Directory
Archive." I have downloaded it twice and it has done the same thing both
times. I'm lost as to what to do. Any information pertaining to a
successful installation of Perl 5 would be greatly appreciated.
Thanks,
Steve Peters
------------------------------
Date: Sat, 14 Mar 1998 20:37:56 -0700
From: "April Kirby" <aprilk@dancris.com>
Subject: Re: Perl 5 installation
Message-Id: <6efins$rgi$1@usenet11.supernews.com>
Steve Peters wrote in message <01bd4fb2$c8cb94c0$a12f8dcf@default>...
>I am trying to install Perl 5 on my system, so I went to
>http://www.perl.com/ and downloaded a file called latest_tar.tar. It
>downloaded successfully and I tried to extract it using WinZip. After I
>click on "Open" and find the file, it quickly says "Error reading header
>after processing 0 entries". I click "Ok" and it says "Invalid Directory
>Archive." I have downloaded it twice and it has done the same thing both
>times. I'm lost as to what to do. Any information pertaining to a
>successful installation of Perl 5 would be greatly appreciated.
>
>Thanks,
>Steve Peters
>
Steve this is not a Perl question but I do know about this one. You have to
switch to the classic interface and then things will go fine. I had to do
the same thing.
April
------------------------------
Date: 14 Mar 1998 23:55:33 GMT
From: alain.deckers@man.ac.uk (A. Deckers)
Subject: Re: Perl4 vs Perl 5
Message-Id: <slrn6gm67k.edt.alain.deckers@nessie.mcc.ac.uk>
In <KpwC10kbMI4N092yn@islandnet.com>,
Matt Elrod <creator@islandnet.com> wrote:
>Wouldn't the group, and Dejanews, be more useful if for every FAQ, someone
>reposted a single well written, if repetitive answer?
No, that is known as spamming.
Alain
------------------------------
Date: Sat, 14 Mar 1998 19:39:11 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
To: chris@ixlabs.com
Subject: Re: Problem stripping Mac headers off of GIF's
Message-Id: <350B2332.6EE88165@coos.dartmouth.edu>
[posted and mailed]
Chris Schoenfeld wrote:
>
> Ha - I was just wondering why this ever worked at all, because I am removing
> the \n characters from the file during the join, which are obviously image
> data in this case.
No, I don't think you are removing them...
> Chris Schoenfeld wrote:
>
> > $gifin=join('',<MACIN>);
Nope, nothing being removed there.
Perhaps you meant:
{
local $/;
($gifin = <MACIN>) =~ tr/\n//d;
}
> > print 'yes' if $gifin=~s/^(.*)(GIF89.*)$/$2/;
Regardless of whether or not that works, it seems inefficient. The first '.*'
matches the entire string, and then backtracks all the way back to 'GIF89'.
And since you're only keeping the second group, there's no point in
remembering the first one.
This would probably be faster:
s/^.*?(GIF89.*)$/$2/;
If you fix the problem with the newlines, and it still doesn't work, post again.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 14 Mar 1998 19:42:25 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: Problem stripping Mac headers off of GIF's
Message-Id: <350B23F4.99074803@coos.dartmouth.edu>
Ronald J Kimball wrote:
>
> Chris Schoenfeld wrote:
> > print 'yes' if $gifin=~s/^(.*)(GIF89.*)$/$2/;
>
> Regardless of whether or not that works, it seems inefficient. The first '.*'
> matches the entire string, and then backtracks all the way back to 'GIF89'.
> And since you're only keeping the second group, there's no point in
> remembering the first one.
> This would probably be faster:
> s/^.*?(GIF89.*)$/$2/;
^^
That should of course be $1.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 15 Mar 1998 01:14:14 GMT
From: jsab@insync.net (James)
Subject: Pulling text from a URL
Message-Id: <350b2a68.7158495@news.insync.net>
Hello,
Would someone be so kind as to tell me how I can pull text from a URL
to store in an array?
Right now I'm pulling it from a text file stored on my server but I'd
like to pull it from a remote URL.
URL's, sample code, anything would be helpful.
Thanks,
James
------------------------------
Date: Sat, 14 Mar 1998 21:53:48 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Pulling text from a URL
Message-Id: <fl_aggie-1403982153480001@aggie.coaps.fsu.edu>
In article <350b2a68.7158495@news.insync.net>, jsab@insync.net (James) wrote:
+ URL's, sample code, anything would be helpful.
Go get the LWP module.
% perldoc lwpcook
=head1 NAME
lwpcook - libwww-perl cookbook
=head1 DESCRIPTION
This document contain some examples that show typical usage of the
libwww-perl library. You should consult the documentation for the
individual modules for more detail.
All examples should be runnable programs. You can, in most cases, test
the code sections by piping the program text directly to perl.
--
Should be sufficient.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Sat, 14 Mar 1998 19:44:13 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
To: ryan pc gibson <ryanpc@lbin.com>
Subject: Re: regexp list context substitution
Message-Id: <350B2461.D05DC1B2@coos.dartmouth.edu>
[posted and mailed]
ryan pc gibson wrote:
>
> how can i apply a substitution regexp to an array? for example:
>
> @html = <FH>;
> @html =~ s/<tr>(.*)<\/tr>/<tr align=center>$1<\/tr>/sm;
>
> ...perl compiler complains that it can't modify array deref in
> substitution. any ideas?
foreach (@html) {
s/<tr>(.*)<\/tr>/<tr align=center>$1<\/tr>/sm;
}
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 14 Mar 1998 20:13:06 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: sockets
Message-Id: <6efh02$m68@flatland.dimensional.com>
"Matthew S. Britt" <msbritt@us.itd.umich.edu> writes:
> Is there a way to 'peek' into a created socket to see if there is anyone
> waiting to accept. I want the program to check every x seconds, and if no
> one is there, to do other work. Is there a way to do this?
Look at the select() function (the one that calls the select(2) system
call, not the one that returns the currently selected filehandle).
A convenient way to use select() is the IO::Select package.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 15 Mar 1998 01:29:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: User-interface Quandary
Message-Id: <6efasu$qv3$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, kherron@campus.mci.net (Kenneth Herron) writes:
:This doesn't seem particularly perl-specific. Perhaps
:comp.human-factors would be a better place to post this?
That's a good idea, and I wish I'd thought of it. But I think I've got
it figured out, thanks mostly to input from private mail and followup
postings. You can check out
http://mox.perl.com/cgi-bin/MxScreen?state=Text
to see what I've come up with.
Thanks, eveyrone, for all the helpful suggestions.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Just because you're screwed *up* doesn't mean you're screwed." --Larry Wall
------------------------------
Date: 15 Mar 1998 07:45:57 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: Where can I get the PERL for Windows NT and 95?
Message-Id: <6eg0vl$3fs$1@bsdti6.sdm.de>
In article <01bd4fb0$64ac6520$8b065c18@preinstalledcom.tampabay.rr.com>, Henning Glatter-Gotz <hgg@techsoftdesign.com> wrote:
> Try http://www.perl.com/CPAN-local/doc/FAQs/nt/Perl_for_Win32_FAQ.html
Better still: Get the "Perl for Win32" port by Gurusamy Sarathy!
Not only does it install absolutely easily, but it also contains many
useful modules from CPAN in precompiled form - i.e., you don't have to
compile or install them, just use them!
Moreover, the port supports MakeMaker right out of the box!
You just need a C compiler (Borland C++ or MS Visual C++) and then you
can install additional modules as easily as under Unix:
perl Makefile.PL
dmake
dmake test
dmake install
(with MSVC, use "nmake" instead of "dmake").
(Hint: Install the C compiler first before installing the Perl port!)
And finally, the port is quite up to date (Perl 5.00402).
The port is available from http://www.perl.com/CPAN/authors/id/GSAR/.
Do it! You won't regret it.
Yours sincerely,
--
Steffen Beyer <sb@sdm.de>
Feel free to visit my download area with free software at
http://www.engelschall.com/u/sb/download/
------------------------------
Date: Sat, 14 Mar 1998 21:21:08 -0700
From: "Steve Peters" <michboy@caspers.net>
Subject: Writing Scripts
Message-Id: <01bcf17c$8b0c2940$a12f8dcf@default>
Okay, I got Perl 5 installed, and I installed cgi.pm on my computer. Now
what? I have a script all written out, but I don't know how to save it as
a .cgi or .pl file.... If anyone could give me any information whatsoever,
tips, hints, clues, or just plain out telling me how to do it, I would be
grateful.
Steve Peters
------------------------------
Date: Fri, 13 Mar 1998 11:23:25 -0700
From: NerveGas <NerveGas@see_signature.com>
Subject: Re: You have 1 message(s) - how to print plurals?
Message-Id: <3509799D.4257@see_signature.com>
> I have written a module fairly sophisticated pluaralizing module for English
> nouns and verbs. Currently it's called Text::Inflect::English and I'll
> make it available from:
You are the man! That was quie a bit of work for such a (seemingly)
small task, but I, for one, would definitely like to thank you for the
effort! You've just made a lot of people's programming tasks even
easier for a long time to come.
Steve Wolfe
--
----------------------------------------
Domain name for replying is "inconnect".
----------------------------------------
------------------------------
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 2101
**************************************