[7766] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1391 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 30 12:14:57 1997

Date: Sun, 30 Nov 97 09:00:27 -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, 30 Nov 1997     Volume: 8 Number: 1391

Today's topics:
     Re: 2 things are the same yet not equal. (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     assignment of STDIN within a while loop <thebreez@erols.com>
     Re: assignment of STDIN within a while loop <rjk@coos.dartmouth.edu>
     Re: Backquote in Perl <carse@ibm.net>
     Re: Compiling perl <mchase@ix.netcom.com>
     Confused about regex (Mark666769)
     Re: Confused about regex <ebohlman@netcom.com>
     getting value of a variable (John Saya)
     I looking for a programmer <webmaster@datacomm.ch>
     Re: last straw in an array? , snailgem@aol.com
     Re: newer than new to perl <billg@networkapparel.com>
     Perl 5.004 on a SPARC <froboz@cif.rochester.edu>
     Pipes in Perl-Win32 (Jay Adam Guerette)
     Re: Q: alternative to Perl? (Tom Hukins)
     Re: Q: Learning perl with no progr. experience (Lisa Applegate)
     Re: Q: Learning perl with no progr. experience (Bill Goffe)
     Re: Q: Learning perl with no progr. experience (Peter J. Schoenster)
     Re: Q: Learning perl with no progr. experience <youngej@magpage.com>
     Re: READING the last few lines of a HUGE FILE. (Brock Sides)
     RESOURCE KIT ANOMALY... ONE MORE TIME <pjhousto@cse.dnd.ca>
     Re: Resource Kit Anomaly (Peter J. Schoenster)
     Re: Resource Kit Anomaly <tchrist@mox.perl.com>
     Re: Resource Kit Anomaly (Nathan V. Patwardhan)
     Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
     Re: Which function yields FROM in w command ? <rra@stanford.edu>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 29 Nov 97 20:36:46 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: 2 things are the same yet not equal.
Message-Id: <3480c4f6$3$ofn$mr2ice@speaker>

In <34809D3D.7BD8@saveware.com>, on 11/29/97 at 04:54 PM,
   The White Rabbit <sbachman@saveware.com> said:
+-----
| getting this?  They both look the same when I output them (STDOUT).  The one
| from the port is also chomped already so I know it isnt an extra return.
+--->8

Ummm, no, you don't.  Assuming Unix, chomp is removing \n --- but "Internet
ASCII" (well, "ARPA Internet Text Format" or some such rot) is \r\n, so if the
remote end of the socket complies strictly with the RFCs it may have stuck in
a \r you're not accounting for.  Try dumping the strings in hex.

(Worse, you can't assume \r\n as EOL either, because a lazy remote might well
use bare \n --- "all the world's a Unix" or some such rot.  Occasionally I'd
like to see the return of Tenex to teach Internetters humility :-)

-- 
brandon s. allbery           [Team OS/2][Linux][JAPH]        bsa@void.apk.net
cleveland, ohio              mr/2 ice's "rfc guru" :-)                  KF8NH
"Never piss off a bard, for they are not at all subtle and your name scans to
 `Greensleeves'."  ---unknown, quoted by Janet D. Miles in alt.callahans



------------------------------

Date: Sat, 29 Nov 1997 22:17:29 -0500
From: Kevin Bree <thebreez@erols.com>
Subject: assignment of STDIN within a while loop
Message-Id: <3480DAC9.35E58736@erols.com>

I am reading the excellent Learning Perl book from O'Reilly & Associates
and while doing the exercises at the end of chapter 4 came across a
curious question

The statement 'while($nb=<STDIN> && $nb!=999)...' yields a value of 1 in
$nb no matter what the input but the statement
'while(($nb=<STDIN>) && $nb!=999)...' yields the input value in $nb.

Why do the extra parens make a difference?

Thanx



------------------------------

Date: Sat, 29 Nov 1997 22:51:49 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: assignment of STDIN within a while loop
Message-Id: <3480E2D4.37DB@coos.dartmouth.edu>

Kevin Bree wrote:
> 
> I am reading the excellent Learning Perl book from O'Reilly & Associates
> and while doing the exercises at the end of chapter 4 came across a
> curious question
> 
> The statement 'while($nb=<STDIN> && $nb!=999)...' yields a value of 1 in
> $nb no matter what the input but the statement
> 'while(($nb=<STDIN>) && $nb!=999)...' yields the input value in $nb.

That's not entirely correct.  $nb will have a value of 1, unless <STDIN>
returns a false value or $nb is currently equal to 999.

> Why do the extra parens make a difference?

Because of precedence.  && binds tighter than assignment, so the above
is
equivalent to:
while( $nb = (<STDIN> && $nb!=999) )
             ^^^^^^^^^^^^^^^^^^^^^
             Evaluate this, then assign the result to $nb

On the other hand, if you use 'and', you don't need the parentheses,
because
'and' binds looser than assignment (and most other operations).
while($nb=<STDIN> and $nb!=999)

So, if you use &&, just remember to use parentheses.

Chipmunk


------------------------------

Date: Sun, 30 Nov 1997 08:13:28 -0600
From: "John Carse" <carse@ibm.net>
Subject: Re: Backquote in Perl
Message-Id: <3481756f.0@news1.ibm.net>

I'm going to guess and tell you to use the perl "chdir" command. From your
message, I don't really understand why you believe it is "not" working. I'm
assuming that you want to get a directory listing (since you say it does
work). For example:

@DIR = ("C:\\WINNT", "C:\\WINNT\\SYSTEM");
 foreach $i (@DIR) {
  chdir $i;
  @files = `dir`;
   foreach (@files) {
        print;
   }
 }


venkat5@hotmail.com wrote in message <880523064.10150@dejanews.com>...
>could someone help in ,how to use cd(change directory) within backquotes.
>print `cd \dir1`; is not working. other  commands like dir are working.
>i am using Perl 5.001 under WinNT 4.0
>Thanx.
>
>-------------------==== Posted via Deja News ====-----------------------
>      http://www.dejanews.com/     Search, Read, Post to Usenet




------------------------------

Date: Fri, 28 Nov 1997 12:52:05 -0800
From: "Michael A. Chase" <mchase@ix.netcom.com>
Subject: Re: Compiling perl
Message-Id: <65roj6$dgv@dfw-ixnews3.ix.netcom.com>

Please!  'make' and 'make test' before 'make install', just like it says
in INSTALL. })

--
Mac :})   mchase@ix.netcom.com

Jason Gloudon wrote in message <65hp7a$hpl$4@daily.bbnplanet.com>...
>Anthony Licciardi (914398N@knotes.kodak.com) wrote:
>: I have downloaded perl5 and extracted all the files into a directory.
I
>: have run the Configure command followed by the config.sh command. I am
>: still unable to see the new directories where the libraries and
>: executable should have been put into. (these directories were
specified
>: while running the Configure command)
>: if anyone has done this could they please tell me where I went wrong.
In
>: the end I just want an executable 'perl' program.
>: Thanks
>
>Did you read the INSTALL and REAMDE file ?
>
>Did you do a 'make install' ?
>
>'make -n install' will tell you what make install would do.





------------------------------

Date: 30 Nov 1997 10:53:27 GMT
From: mark666769@aol.com (Mark666769)
Subject: Confused about regex
Message-Id: <19971130105301.FAA17322@ladder01.news.aol.com>

Hi,

I'm confused about this regexp.
Specifically, about the ^ in brackets.

$filename =~ s@~([^/]+)@&getlogin($1)@e;

Walking through it, it finds a tilde, followed by one or more
of a newline (^) or a slash, right?

What's counterintuitive about this regex was shown when I
wrote a little test program, which exhibited the following behavior:

1) it matched a string like ~xxx/ even when it WASN'T at the
beginning of the line, and:

2) when I removed the ^ it didn't find it anywhere in the string.

3) How can you look for something FOLLOWED by a newline?

Obviously, I'm missing something here. Could someone clue me in?

Thanks.



------------------------------

Date: Sun, 30 Nov 1997 11:45:16 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Confused about regex
Message-Id: <ebohlmanEKGJBG.Dzz@netcom.com>

Mark666769 <mark666769@aol.com> wrote:
: Hi,

: I'm confused about this regexp.
: Specifically, about the ^ in brackets.

: $filename =~ s@~([^/]+)@&getlogin($1)@e;

: Walking through it, it finds a tilde, followed by one or more
: of a newline (^) or a slash, right?

Wrong.  Inside a character class, the caret (^) behaves differently than 
outside.  If it's the very first thing in the character class (as it is 
here), it's a metacharacter that means "complement the character class."  
If it comes after some other character, it's treated as a literal caret 
rather than a metacharacter.

In this case, the regexp finds a tilde followed by one or more non-slash 
characters, the latter being gathered up and used as an argument to 
getlogin().

I'd suggest that you man perlre a couple times; regexps are complicated 
enough that you can't pick them up completely in a single reading.  
There's also, of course, Jeffrey Friedl's book _Mastering Regular 
Expressions_.




------------------------------

Date: Sun, 30 Nov 1997 08:27:05 GMT
From: jsaya@iname.com (John Saya)
Subject: getting value of a variable
Message-Id: <65r89p$a3t@mtinsc05.worldnet.att.net>

I have a small program here that I want to use on a web site, but the
value of $host is not being passed to the subroutine in url_get.pl.
If I use $host="http://www.site.com" it will work, but not if I type
it in at the command line.


#!/usr/local/bin/perl

$| = 1;

require 'url_get.pl';

print "Host: ";
$line = <STDIN>;
$host = chop ($line);

&url_get($host);

exit;

Please email any suggestions to me at jsaya@iname.com

Thanks




------------------------------

Date: Mon, 01 Dec 1997 12:50:58 +0100
From: "D. Minder" <webmaster@datacomm.ch>
Subject: I looking for a programmer
Message-Id: <3482A4A2.2C8A@datacomm.ch>

Hi

I looking for a programmer or student to realized a project (game)
in perl? 

If you want earn much money for a simple game please write me for more
information

thanks


------------------------------

Date: Sun, 30 Nov 1997 02:24:45 -0500
From: , snailgem@aol.com
Subject: Re: last straw in an array?
Message-Id: <348114BB.5B4E@aol.com>

> But Andrew was not refering to the $# special variable, he was refering
> to the two characters $# immediately preceding _an array name_
> 
> This is described in the 'perldata' (where else?) man page:
> 


Yes, this is fine.
But how did you know to look for it in the perldata manpage?
This is one of the problems beginners encounter, I think, with PERL:
we're constantly being referred to the FM, but it seems to me that you
have to know quite a bit to make the perl man pages useful to you.

> grep 'last element' *.pod

Aha. . .

> Find out where they got installed on your system.
> 
> Use them.

Found them.
Will use them.
(Humiliation works ;-------)  )

Thank you.


------------------------------

Date: Sun, 30 Nov 1997 00:26:45 -0500
From: Bill Guindon <billg@networkapparel.com>
To: jennifer <tuia@msn.com>
Subject: Re: newer than new to perl
Message-Id: <3480F915.DBA9F310@networkapparel.com>

(sender CC'd via email)

jennifer wrote:
> 
> I modestly approach this group to ask a most mundane,simple question and
> hopefully, over time, I'll be able to show my face here again.  Here it
> goes...

Welcome to the club!  I went through the same thing about 2 months ago.

> I've installed perl on my win95 system.  It's in the C drive.
> I've copied the most simple "hello world" program (if you could call it
> that) using my notepad and have named it hello.pl.
> I'm at the c:\perl5 prompt in ms-dos and I try to run the program.
> C:\perl5\perl hello.pl
> A message returns that says "this program cannot be run in dos mode".
> I thought that is where you run perl from a win95 system?

You CAN run it from a DOS prompt, but you may have taken it a bit too
seriously.  Looks like you went to DOS Mode.  The difference is whether
windows is running or not.

Try this...  Go into windows, click on "Start", then "Run", then type in
"command" and hit enter.  CD to your perl app, and give it another
shot.  It should work now.

Good Luck, and Happy Hacking!
Bill Guindon


------------------------------

Date: 30 Nov 1997 06:38:07 GMT
From: Joshua Pincus <froboz@cif.rochester.edu>
Subject: Perl 5.004 on a SPARC
Message-Id: <65r1kf$1kc2@biko.cc.rochester.edu>

Hi,

I'm having lots of trouble installing Perl 5.004_04 on my Sparc 1, which is
running SunOS 4.1.3_u1 with gcc 2.7.2.2 and the stock Sun assembler and linker.
I don't think that fork() is working properly, and I can't get certain packages
to run correctly, such as Xforms4Perl-0.7.  Xforms4Perl causes a bus error, and
the fork() call seems to be doing REALLY strange things.

Has anyone installed 5.004_04 on a Sparc 1 with my configuration?  If you 
have, I'd love to know how you configured it at compile-time and if you ran
into any problems later on.

Thanks,
JP
-- 
Joshua Pincus
UNIX Programmer
University of Rochester Computing Center
Rochester, New York 14627


------------------------------

Date: Sun, 30 Nov 1997 14:40:10 GMT
From: JayGuerette@pobox.com (Jay Adam Guerette)
Subject: Pipes in Perl-Win32
Message-Id: <34817abb.36727344@www.guerette.net>

I am having a problem with pipes. Here is a sample


prog1
---
#! /usr/bin/perl

print STDOUT "foo";
---

prog2
---
#! /usr/bin/perl

open(HANDLE,"prog1|");
while (<HANDLE>
{
	print $_;
}
close(HANDLE);
---


The idea is, that 'prog2' should call 'prog1' and capture the output
and print it. When 'prog2' runs, it scans every drive on my system,
then runs 'prog1'. The output of 'prog1' goes directly to STDOUT, and
then the complete path of 'prog1' is displayed too. 'prog2' never
receives the output of 'prog1'. To answer the obvious question, the
path to perl\bin IS set up in the environment.

Any idea why this doesn't behave as expected?




------------------------------

Date: Sun, 30 Nov 1997 16:02:58 GMT
From: tom@NOSPAMeborcom.com (Tom Hukins)
Subject: Re: Q: alternative to Perl?
Message-Id: <34818d7b.2598939@nntp.netcom.net.uk>

On Sat, 29 Nov 1997 10:47:36 -0800, "Xah" <xah@best.com> wrote:

>Are there alternative languages comparable to Perl with respect to text
>manipulation?
>
>I'm wondering because I'm not too thrilled by Perl's grammar, but need
>Perl's text manipulation power.

If you like Java you might want to look at pat
<http://www.win.net/~stevesoft/pat>, a shareware library which
does pattern matching with regular expressions.

I haven't looked at this myself, but it sounds like you might
find it useful.

Regards,
Tom Hukins


To reply to this message remove the phrase 'NOSPAM' from my address

-- 
       Learn how to create amazing web sites

     Visit eBORcOM's Web Development Resources
          http://www.eborcom.com/webmaker/


------------------------------

Date: Sat, 29 Nov 1997 20:03:33 -0600
From: lapplegate@pekin.net (Lisa Applegate)
Subject: Re: Q: Learning perl with no progr. experience
Message-Id: <3480c0c5.22553844@snews.zippo.com>

comdog@computerdog.com (brian d foy) wrote:

>part of a programmer's skill is picking up things by reading, and 
>"Learning Perl" is a gentle introduction to this since the style is
>very readable (instead of technically dense, which you get when you
>move on to the reference work "Programming Perl" [2]), especially if you
>pick up on the hidden themes.

These two books have been excellent learning tools for me. 

Speaking as someone who's prior programming experience was so long ago
as to be completely negligible,  I have found that a *combination* of
the blue llama (Learning Perl) and blue camel (Programming Perl) has
been the best for me so far.   I find myself going back and forth
between the two books a *lot*.   The llama gives me good examples and
the camel gives me details, between the two most of my questions have
been answered.   

Of course I'm still very much a perl newbie, but I have found that
these two books,  real-life programming tasks (i.e. working on
problems meaningful to what I needed done) and remembering to make
only one change at a time when debugging have helped me in learning
perl.

Now if only I can get Santa to bring me the cute owls and the resource
kit ...  :-)

Lisa
lapplegate@pekin.net


------------------------------

Date: 30 Nov 1997 07:01:58 GMT
From: bgoffe@cook.cba.usm.edu (Bill Goffe)
Subject: Re: Q: Learning perl with no progr. experience
Message-Id: <65r316$d3a$1@thorn.cc.usm.edu>

Cindy Wong (ckpwong@undergrad.math.uwaterloo.ca) wrote:
: > i wanna start learning perl. The thing is: i have no programming
: > experience whatsoever (yeah, writing print "" statements). I'm looking
: > for a place on the web to start, and if non excistent, a book.

: If you learn better by reading printed materials like I am, and would like
: to read a book that has the fewest mistakes (if any), I would say you
: should go ahead with "Learning Perl", 2nd ed., by Randal Schwartz and Tom
: Christiansen, O'Reilly & Associates, Inc. (aka the blue llama book).
: Another good book for people who are more comfortable with programming and
: serve as a reference for most if not all perl programmers is "Programming
: Perl", 2nd ed., by Larry Wall, Randal Schwartz and Tom Christiansen, also
: from O'Reilly.  (Can any one correct me wit the authors please?  I left
: the book in my office.)  This one is often referred to as the blue camel
: book.  If you use perl on NT/95, get "Learning Perl on Win32 Systems", aka
: the gecko book.

For a less "dense" book (less coverage, but easier going per page), I
rather like "Cross Platform Perl," Eric F. Johnson, M&T Books, ISBN
1-55851-483-X.


  .---.   Bill Goffe                                      Bill.Goffe@usm.edu
 (    |   Dept. of Econ. and International Business   office: (601) 266-4484
  )__*|   University of Southern Mississippi             fax: (601) 266-4920
    (_|   Southern Station, Box 5072
          Hattiesburg, MS 39406-5072


------------------------------

Date: Sun, 30 Nov 1997 13:46:35 GMT
From: pschon@baste.magibox.net (Peter J. Schoenster)
Subject: Re: Q: Learning perl with no progr. experience
Message-Id: <34816bc1.58683572@news.magibox.net>

av3@xs4all.nl wrote:

>Hi,
>
>i wanna start learning perl. The thing is: i have no programming
>experience whatsoever (yeah, writing print "" statements). I'm looking
>for a place on the web to start, and if non excistent, a book.

Without a doubt the "Learning Perl" is an excellent intro into Perl.
I had not computer background (still don't) when I picked it up.  I
also started hacking Matt Wright scripts (I don't reccommend this!!). 

Keep in mind there is an OO perl and non OO perl.  I would buy the 2nd
editon "Learning Perl" and use CGI.pm as it is OO and will help you
begin to become familiar with it even if you don't understand
everything (in which case you would be like me).  I would suggest that
you go to Randal Schwartz's website and see how he writes cgi scripts.



http://www.stonehenge.com/merlyn/WebTechniques/

 Always look to see how the masters did it. I imagine that in time you
will develop your own method.

I also suggest you get the 1st and 2nd edition of "Programming Perl".
My 1st edition is almost dog-eared.  I have some SamsNet books that
are in mint condition and will always be so as long as I still own
them.

You might also want to get "Advanced Perl Programming".  Just peruse
and be aware.

Peter





------------------------------

Date: 30 Nov 1997 15:01:25 GMT
From: Ed Young <youngej@magpage.com>
Subject: Re: Q: Learning perl with no progr. experience
Message-Id: <65rv45$1bj$0@204.179.92.81>

I R A Aggie wrote:
> In article
> <Pine.SUN.3.95q.971129105815.17988C-100000@napier.uwaterloo.ca>, Cindy
> Wong <ckpwong@undergrad.math.uwaterloo.ca> wrote:
> 
> + Speaking of books, does anyone know what's the "Advanced Perl Programming"
> + book called?  leopard? ;)
> 
> Yes. I suppose it could be called the 'black and blue leopard'... :)
> 

"panther book" is what struck me, I usually think of a leapord with
rosettes...


------------------------------

Date: Sun, 30 Nov 1997 00:36:27 -0600
From: cbks@NOSPAM.magibox.net (Brock Sides)
Subject: Re: READING the last few lines of a HUGE FILE.
Message-Id: <cbks-3011970036280001@demeter-20.magibox.net>

In article <348041EF.5823A063@ait.acl.ca>, gdoucet@ait.acl.ca wrote:

> This is how I normally read a file:
> 
>    open(FILE,"$basedir/a_data.dat") || &err_nodat;
>    @file = <FILE>;
>    close(FILE);
> 
> But what if I want to read only the last few lines of an enourmously
> large log file. I'm talking a few MBytes or maybe 10MBytes. I don't want
> to write to it, only read it. The lines in the file are all different
> lengths.
> 
> There must be a better way than to read a few MBytes of info into a
> variable.

Assuming you're running UNIX and have no need to be portable, why not open
a pipe from tail?

open(TAIL, "tail -$number_of_lines $basedir/a_data.dat |") || die;
@tail = <TAIL>;
close (TAIL);

Carl Brock Sides cbks@NOSPAM.magibox.net
To reply by email, remove "NOSPAM" from reply address.
Philosophy and Vegetarian recipes:
http://www.magibox.net/~brock/


------------------------------

Date: Sun, 30 Nov 1997 16:29:52 GMT
From: Phil Houstoun <pjhousto@cse.dnd.ca>
Subject: RESOURCE KIT ANOMALY... ONE MORE TIME
Message-Id: <348192F4.5CEA5A65@cse.dnd.ca>

OK people, listen up....

I posted a simple inquiry as to whether or not anyone else has
encountered 'glitches' in the CPAN contained on the PRK CD-ROM. I
did not entreat discussion on the worth of the PRK, or lack thereof, 
or on O'Reilly's business practices, or on the use of sheeps' bladders
to predict earthquakes.  Please create a separate thread for such
discussions.  Thank you.

-- 

Phil Houstoun            Voice: (613) 991-7173 
Email: remove the 'j' in pjhousto@cse.dnd.ca
-----------------------------------------------------------------------


------------------------------

Date: Sun, 30 Nov 1997 13:33:02 GMT
From: pschon@baste.magibox.net (Peter J. Schoenster)
Subject: Re: Resource Kit Anomaly
Message-Id: <3481685f.57817817@news.magibox.net>

clay@panix.com (Clay Irving) wrote:

>In <34801903.48387327@news.magibox.net> pschon@baste.magibox.net (Peter J. Schoenster) writes:
>
>>Is this resource kit worth buying?  I saw it for $112.00 at some
>>discount computer store online.
>
>I think so. :)
>
>>Why do they not tell us what is in the book(s)?  
>
>Did you look at: http://perl.oreilly.com/prk_index.html

I will try not to be rude.  You just say what is said at the O'Reilly
site.  What modules? Just a bunch of good modules??  Sure.

This thing smacks of a "Just in time for Christmas".  Recall that the
2nd editon of Perl Programming was available on the internet?  I also
recall that many books have the table of contents and some chapters
online?  Why not in this case?  I think there is a new mentality at
work at O'Reilly.

Have you ever looked at Phillip Greenspun's book "Database Backed
Websites: The Thinking Person's ..."?  I looked in the back of the
book to see what was on the CD.  There was not CD; just a picture of a
CD and this:

"Would you really want to take Web publishing advice from someone who
had to burn a CD-ROM to distribute his software?  Come to
http://demo.webho.com for electronic versions of the source code
examples in this book...You can give it to your friends and still keep
it for yourself"

Now this is the attitude that I like and appreciate.  I went to his
site and read a few chapters and looked at some code and I bought his
book.  It is in the traditon of human being writing book for other
human being as opposed to automaton to automaton.  Some peope describe
his attitude as sarcastic but I find it funny as in "It's better to
keep your mouth shut and appear stupid than to open it and remove all
doubt" - Mark Twain.

I bought "CGI Programming on the ..." from O'Reilly.  The author had a
website.  How do you spell weak?  He had only the simplest scripts
there.  Why bother at all with a website that would be so weak.

And now O'Reilly is putting out this package and there is no website
at all!  This is only what I would call glib statements on there
website.

Peter








------------------------------

Date: 30 Nov 1997 14:42:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Resource Kit Anomaly
Message-Id: <65ru0b$7l6$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    pschon@baste.magibox.net (Peter J. Schoenster) writes:
:And now O'Reilly is putting out this package and there is no website
:at all!  

You mean a set of web resources dedicated to some aspect of the PRK?
Perhaps you might elaborate on what you'd like to see on such a site.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
Man is the best computer we can put aboard a spacecraft ... and the
only one that can be mass produced with unskilled labor.
                --Wernher von Braun


------------------------------

Date: 30 Nov 1997 15:10:36 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Resource Kit Anomaly
Message-Id: <65rvlc$qjp@fridge.shore.net>

Peter J. Schoenster (pschon@baste.magibox.net) wrote:

: I will try not to be rude.  You just say what is said at the O'Reilly
: site.  What modules? Just a bunch of good modules??  Sure.

I agree with tchrist.  What would you like to see on ORA's website,
and why haven't you contacted anyone at ORA about the things you'd
like to see?  They'd really like to hear what you have to say.

Let me see what I can do about putting up a TOC and some sample
materials.  I had intended to put the source code for the "programming
 ... modules" book on ftp.ora.com as the examples didn't make it to the
CD on time.  

You can also mail me with other suggestions -- I'll ask around at ORA
regarding your suggestions over the next few days.

--
Nate Patwardhan



------------------------------

Date: 30 Nov 1997 16:12:58 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <65s3aa$93m$1@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 23 Nov 1997 16:01:19 GMT and ending at
01 Dec 1997 11:50:58 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" e-mail address and name.
    - Original Content Rating is the ratio of the original content volume
      to the total body volume.
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.

Excluded Posters
================

perlfaq-suggestions@mox.perl.com

Totals
======

Total number of posters:  400
Total number of articles: 879 (351 with cutlined signatures)
Total number of threads:  305
Total volume generated:   1500.8 kb
    - headers:    604.3 kb (12,151 lines)
    - bodies:     826.6 kb (25,628 lines)
    - original:   546.3 kb (17,776 lines)
    - signatures: 67.6 kb (1,381 lines)
Original Content Rating: 0.6610

Averages
========

Number of posts per poster: 2.20
    median: 1.0 post
    mode:   1 post - 273 posters
    s:      3.73 posts
Number of posts per thread: 2.88
    median: 2 posts
    mode:   1 post - 107 threads
    s:      3.41 posts
Message size: 1748.3 bytes
    - header:     704.0 bytes (13.8 lines)
    - body:       962.9 bytes (29.2 lines)
    - original:   636.5 bytes (20.2 lines)
    - signature:  78.8 bytes (1.6 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   42    73.6 ( 31.1/ 32.7/ 18.3)  brian d foy <comdog@computerdog.com>
   38    57.8 ( 32.0/ 17.7/ 10.3)  Tom Phoenix <rootbeer@teleport.com>
   33    55.2 ( 22.2/ 27.9/ 13.6)  Jeremy D. Zawodny <zawodny@hou.moc.com>
   14    24.3 (  7.9/ 16.4/ 11.2)  Tad McClellan <tadmc@metronet.com>
   14    37.6 ( 10.4/ 27.2/ 16.8)  Mark Mielke <markm@nortel.ca>
   12    15.1 (  7.6/  6.7/  4.1)  Jonathan Feinberg <jdf@pobox.com>
   12    17.1 (  6.6/ 10.5/  6.9)  Tushar Samant <scribble@wwa.com>
   11    18.7 (  8.5/ 10.0/  4.6)  Toutatis <toutatis@no.mail.please>
   11    16.7 (  5.9/ 10.6/  8.1)  Andrew M. Langmead <aml@world.std.com>
   10    15.8 (  7.1/  8.4/  5.7)  Zenin <zenin@best.com>

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  73.6 ( 31.1/ 32.7/ 18.3)     42  brian d foy <comdog@computerdog.com>
  57.8 ( 32.0/ 17.7/ 10.3)     38  Tom Phoenix <rootbeer@teleport.com>
  55.2 ( 22.2/ 27.9/ 13.6)     33  Jeremy D. Zawodny <zawodny@hou.moc.com>
  40.9 (  4.5/ 36.4/ 26.9)      6  Keith Willis <keith_willis.junk@non-hp-unitedkingdom-om1.om.hp.com>
  37.6 ( 10.4/ 27.2/ 16.8)     14  Mark Mielke <markm@nortel.ca>
  25.7 (  8.4/ 16.7/  6.5)      9  abigail@fnx.com
  24.3 (  7.9/ 16.4/ 11.2)     14  Tad McClellan <tadmc@metronet.com>
  18.7 (  8.5/ 10.0/  4.6)     11  Toutatis <toutatis@no.mail.please>
  17.7 (  5.1/ 12.6/  6.3)      8  faust@wwa.com
  17.4 (  4.4/ 13.0/  6.5)      7  Ty Cage Warren <tycage@infi.net>

Top 10 Posters by OCR (minimum of five posts)
==============================================

          (kb)    (kb)
OCR       orig /  body  Posts  Address
------  --------------  -----  -------

0.9646     2.1 /   2.1      6  I R A Aggie <fl_aggie@thepentagon.com>
0.9636     3.2 /   3.3      6  Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh" <bsa@void.apk.net>
0.8586     4.0 /   4.6      5  lenkerWEEDS@dircon.co.uk
0.8103     7.1 /   8.8      5  William R. Ward <hermit@cats.ucsc.edu>
0.7690     8.1 /  10.6     11  Andrew M. Langmead <aml@world.std.com>
0.7395    26.9 /  36.4      6  Keith Willis <keith_willis.junk@non-hp-unitedkingdom-om1.om.hp.com>
0.7311     5.1 /   7.0      5  Peter J. Schoenster <pschon@baste.magibox.net>
0.7143     3.7 /   5.2      5  "Robert Friberg" <robert.friberg@your_clothes.eductus-vast.com>
0.7085     4.0 /   5.7      5  Cindy Wong <ckpwong@undergrad.math.uwaterloo.ca>
0.7043     1.5 /   2.2      5  Calle Dybedahl <qdtcall@esb.ericsson.se>

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

          (kb)    (kb)
OCR       orig /  body  Posts  Address
------  --------------  -----  -------

0.5597    18.3 /  32.7     42  brian d foy <comdog@computerdog.com>
0.5029     6.3 /  12.6      8  faust@wwa.com
0.4987     6.5 /  13.0      7  Ty Cage Warren <tycage@infi.net>
0.4864    13.6 /  27.9     33  Jeremy D. Zawodny <zawodny@hou.moc.com>
0.4850     2.5 /   5.1      5  Ilya Zakharevich <ilya@math.ohio-state.edu>
0.4616     4.6 /  10.0     11  Toutatis <toutatis@no.mail.please>
0.4576     2.0 /   4.4      6  John Moreno <phenix@interpath.com>
0.4269     2.8 /   6.6      7  "Michael A. Chase" <mchase@ix.netcom.com>
0.3911     6.5 /  16.7      9  abigail@fnx.com
0.3506     2.2 /   6.3     10  Jason Gloudon <jgloudon@bbn.com>

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   48  PERL Hourly Rates
   13  perl shorter than csh challenge!!
   13  How To Test if number is ODD or EVEN?
   13  Regex for three equal characters
   10  interpreted languages
   10  Q: Learning perl with no progr. experience
   10  Newbie question.   Do you recommend moving from C?
   10  For the pro's ? repost: Leaving HTML tags alone
   10  last element in an array?
    9  Strange 'print Location:' problem with Perl

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  98.8 ( 41.3/ 52.3/ 30.5)     48  PERL Hourly Rates
  34.6 (  7.5/ 26.0/ 12.7)      8  Finding the longest common prefix over a list of strings
  31.6 (  0.6/ 31.0/ 23.5)      1  Building perl under HP-UX using /opt/ansic/bin/cc
  24.6 (  9.1/ 14.7/  8.9)     10  Newbie question.   Do you recommend moving from C?
  22.7 (  9.1/ 12.7/  7.1)     13  perl shorter than csh challenge!!
  21.8 ( 10.2/ 10.7/  5.5)     13  How To Test if number is ODD or EVEN?
  21.5 (  9.7/  9.5/  3.9)     13  Regex for three equal characters
  20.0 ( 10.0/  9.2/  6.8)     10  interpreted languages
  18.4 (  5.5/ 12.9/  5.6)      8  Proxy Client
  18.4 (  6.5/ 11.2/  7.3)     10  last element in an array?

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      44  comp.lang.perl.modules
      12  comp.lang.tcl
      11  comp.lang.misc
      10  comp.lang.scheme
      10  comp.lang.lisp
      10  comp.lang.java.misc
      10  comp.lang.perl.tk
      10  comp.lang.java.programmer
       9  comp.lang.java.api
       7  comp.lang.perl

Top 10 Crossposters
===================

Articles  Address
--------  -------

       8  "JRM" <emergent@cape.com>
       7  Cameron Laird <claird@Starbase.NeoSoft.COM>
       5  Tad McClellan <tadmc@metronet.com>
       5  "Myles Penlington" <myles@kcbbs.gen.nz>
       5  Greg Hassan <greg@hassan.com>
       5  lvirden@cas.org
       5  Programming <sysdev@mb.sympatico.ca>
       5  Roedy Green <roedy@BIX.com>
       5  pmcgov@erols.com
       5  "Ed Jensen" <ejensen@nospam.visi.com>


------------------------------

Date: 29 Nov 1997 17:40:25 -0800
From: Russ Allbery <rra@stanford.edu>
To: Michael Agbaglo <byteshifter@shifted-bytes.de>
Subject: Re: Which function yields FROM in w command ?
Message-Id: <m33ekfyx9y.fsf@windlord.Stanford.EDU>

[ Posted and mailed. ]

Michael Agbaglo <byteshifter@shifted-bytes.de> writes:

> 10:55pm  up  4:48,  2 users,  load average: 0.00, 0.00, 0.00
> USER     TTY      FROM              LOGIN@  IDLE   JCPU   PCPU  WHAT
> byteshif ttyp0    pitfall.shifted-  6:13pm  0.00s  0.40s  0.05s  w
> byteshif ttyp1    pitfall.shifted- 10:37pm  1:39   0.38s  0.16s  -bash

> as you can see the FROM field is truncated... but I like to get the FQDN
> to set $DISPLAY.  any idea which function to call ?

I'm afraid that this really isn't a Perl question, in the sense that you
would do this (or more likely not do this) the same in Perl as in any
other programming language.

The primary answer is that it depends on your operating system.  If you're
using Solaris or a few other systems, you may have the full hostname in
utmpx or some similar file (the standard utmp format doesn't have enough
room for it).  On some systems, that information isn't preserved and
you're just out of luck.  On some systems, TCP wrappers logs that
information but you'd have to parse it out of hte logs, which could be
hard.

In general, you don't want to try to set DISPLAY this way anyway, since
you could be logged in through a host that isn't actually your display.
Most telnet implementations will pass DISPLAY automatically, which is the
right way to do it.  rlogin generally doesn't.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


------------------------------

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 1391
**************************************

home help back first fref pref prev next nref lref last post