[11884] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5484 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 26 10:07:37 1999

Date: Mon, 26 Apr 99 07:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 26 Apr 1999     Volume: 8 Number: 5484

Today's topics:
        "learning perl" does not seem to be written well mikecard@my-dejanews.com
    Re: "learning perl" does not seem to be written well (Randal L. Schwartz)
    Re: $ENV...Explained (markus)
    Re: Better implementation of the modulus function? <droby@copyright.com>
    Re: cgi script smnayeem@my-dejanews.com
    Re: Country of a visitor (Michael Stillwell)
    Re: Country of a visitor <Tony.Curtis@vcpc.univie.ac.at>
    Re: Fork goddamit! Fork! (Randal L. Schwartz)
    Re: Generating a unique string for order number (Bart Lateur)
    Re: How do i print something using perl? <tchrist@mox.perl.com>
    Re: How do i print something using perl? smnayeem@my-dejanews.com
    Re: How do i print something using perl? <tzadikv@my-dejanews.com>
    Re: How do i print something using perl? (Bart Lateur)
    Re: MacPerl to AS (well, vice versa) (Chris Nandor)
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Newbie regex query <gellyfish@gellyfish.com>
        question about guestbook <devries-devries@wxs.nl>
    Re: Split sizes instead of pattern? (David Cantrell)
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
        system calls from Apache using perl <ga-mic@netcologne.de>
    Re: What is wrong with this picture? (Tad McClellan)
    Re: What is wrong with this picture? (Tad McClellan)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 26 Apr 1999 13:03:56 GMT
From: mikecard@my-dejanews.com
Subject: "learning perl" does not seem to be written well
Message-Id: <7g1o7q$94d$1@nnrp1.dejanews.com>

hi

listening to suggestions from this group i purchased "learning perl" to...uhm
learn perl (i was trying the various online tutorials but found they were
making assumptions where they should not)

i am only on page 13 and i am already getting aggrevated.  the book introduces
the =~ operator in an example but never explains what it is (they just seem to
assume you'll figure it out, but since this is supposedly a book for beginners
NO assuptions should be made).

then they give an example for turning an inputed variable to lower case  with
the expression	$name =~ s/\W.*//; the eplanation says this command is
supposed to "zap" all the characters  in this expression and replace them
with nothing...so, uhm if you take the contents of this scalar and replace
them with nothing,  where does it go, ascii purgatory?	if the contents of
this scalar are replaced with nothing how can you make the contents lower
case (aren't you just making nothing lower case)

i am very frustrated that i threw down my hard earned money  (which i have no
problem doing if the product is as its advertised...in this case a BEGINNERS
book on perl,  if this is a beginners book EVERYTHING should be explained and
explained well).  and one last thing,  what the f*ck is SED AWK and GREP.  the
book keeps making references to this and i do not have a clue what they are.

is there a perl book out there that is actually written for beginners.

thanks for enduring my rant i feel much better

mike cardeiro


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 26 Apr 1999 06:51:01 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: "learning perl" does not seem to be written well
Message-Id: <m1aevvsd6i.fsf@halfdome.holdit.com>

>>>>> "mikecard" == mikecard  <mikecard@my-dejanews.com> writes:

mikecard> i am only on page 13 and i am already getting aggrevated.  the book introduces
mikecard> the =~ operator in an example but never explains what it is (they just seem to
mikecard> assume you'll figure it out, but since this is supposedly a book for beginners
mikecard> NO assuptions should be made).

Page 13 is still in chapter 1.  You are reading through the brief
runthrough of everything that appears in later chapters.  It will be
explained much more thoroughly later.

Some people find the runthrough at "exactly the right overview" pace.
If you're not, skip the rest of the runthrough, and go right to
chapter 2.

Perhaps I'll say it more explicitly in a future version of the
book. :)

print "Just another Perl [book] hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 25 Apr 1999 09:34:04 GMT
From: drbrain@ziemlich.org (markus)
Subject: Re: $ENV...Explained
Message-Id: <slrn7i5ocb.l7o.drbrain@josefine.ben.tuwien.ac.at>

In article <7fua98$ed2$1@sys14.hou.wt.net>, HowToFoldSoup wrote:
>I believe the people who answered the question weren't understanding the
>question.

Well, thats possible. Since my native language isn't english, i can
happen that i miss the meaning of something.

But, now  what you ask for is simple. Just use

	@list_of_vars = keys %ENV;

sincerly,
	Markus

-- 
OpenSource - join the revolution


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

Date: Mon, 26 Apr 1999 13:32:24 GMT
From: Don Roby <droby@copyright.com>
Subject: Re: Better implementation of the modulus function?
Message-Id: <7g1pt9$ans$1@nnrp1.dejanews.com>

In article <7g1cuv$7fc$1@taliesin.netcom.net.uk>,
  "Clinton Gormley" <clint@drtech.co.uk> wrote:
> I have recently needed to find the answer to Large Number % 97, and this
> always gave me the wrong answer - presumably because the modulus is worked
> out like this :
>
> (Number / 97 - int(number/97))*97  and with large numbers, too many decimal
> points get lost and you end up with the wrong answer.
>
> Surely, a better implementation would be :
>
> Number  - 97*int(number/97) - then you are working purely with integers and
> the result should be accurate?
>
> Right / wrong?
>

Your second formula is indeed better, and it's probably implemented that way.

But!

If your number is larger than your system's maximum integer, you won't be
working purely with integers anyway.  Perl automatically casts to float when
necessary.

The Math::BigInt module might be helpful.

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 26 Apr 1999 12:40:46 GMT
From: smnayeem@my-dejanews.com
Subject: Re: cgi script
Message-Id: <7g1msd$80g$1@nnrp1.dejanews.com>

  alainch <alain_chiorboli@email.sps.mot.com> wrote:
> If you are under unix you can try to set the setgid bit for your cgi
> script: chmod +s cgi_script_name
how about if im using WinNT with ActivePerl?
smnayeem

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 26 Apr 1999 11:08:08 GMT
From: mist@yoyo.cc.monash.edu.au (Michael Stillwell)
Subject: Re: Country of a visitor
Message-Id: <slrn7i8i8o.htd.mist@fangorn.cs.monash.edu.au>

On Mon, 26 Apr 1999 11:15:19 +0200, Philip 'Yes, that's my address' Newton <nospam.newton@gmx.net> wrote:
: Michael Stillwell wrote:
: > 
: > In your opinion, what proportion of hosts misrepresent their location?
: > Is this proportion worth worrying about?
: 
: What do you mean, location? Most hosts don't say anything about their
: location. Domains are not necessarily connected with geography. Just
: because I'm in Germany doesn't mean I have to use a .de address; .com
: .org .net and even .si .to .tv etc. work just fine.

I should have said: "In what proportion of hosts is the inferred
physical location (inferred from the top-level domain) different to
the true physical location?"

I don't understand why no information can be, or should be, obtained
from a domain name.  Are you saying that knowing I post from an
 .edu.au address gives you no information at all about where I am
physically located?  That is, the probability that I am posting from
Australia is exactly the same as the probability I am posting from
France, Germany or the Bahamas? This is absurd.

If someone posts from an .edu.au address you can be pretty sure they
are physically located in Australia.  Sure, sometimes you will be
wrong, and certainly some domains are more "misleading" than others
(e.g. .com, .nu, .to), but most of the time, you can make a pretty
good guess.  And, more importantly, I don't think you are wrong
frequently enough to say that no-one should every try to infer
physical location from a domain name.


Michael

-- 
 .. ABSOLUT .SIG. ..
 .. Michael Stillwell ..
 .. mist@yoyo.cc.monash.edu.au ..
 .. http://yoyo.cc.monash.edu.au/~mist/ ..


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

Date: 26 Apr 1999 14:59:58 +0200
From: Tony Curtis <Tony.Curtis@vcpc.univie.ac.at>
Subject: Re: Country of a visitor
Message-Id: <83aevvedv5.fsf@vcpc.univie.ac.at>

Re: Country of a visitor, selectthree
<selectthree@gsig-net.qc.ca> said:

selectthree> Does anyone know the code to determine
selectthree> the origin country of a visitor (or
selectthree> only it's code, like .com, .ca, .uk,
selectthree> .fr...)?

selectthree> Please help me.

Try asking for their passport.

Your question is far too vague and doesn't have
anything to do with perl does it?

tony


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

Date: 26 Apr 1999 06:00:57 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Fork goddamit! Fork!
Message-Id: <m13e1ntu2e.fsf@halfdome.holdit.com>

>>>>> "ralawrence" == ralawrence  <ralawrence@my-dejanews.com> writes:

ralawrence> I have some perl run as cgi which takes a whole load of params, forks, the
ralawrence> child displays a "thanks!" message whilst the parent goes off and does
ralawrence> something (which takes a while).

The kid has to close STDOUT so that the web server knows that there's
no one else around that might be talking to the web client (browser).

I have a few examples of this in my columns at

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

Go check them out.  Use the Search Engine to look for "fork" if you're
in a hurry, but remember to read the associated column as well, as the
snippets do not contain many comments.

print "Just another Perl hacker and web whacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Mon, 26 Apr 1999 11:44:42 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Generating a unique string for order number
Message-Id: <372750af.14225629@news.skynet.be>

Abigail wrote:

>On a single machine, this ought to give unique strings:
>
>     sub unique {
>         sleep 2;  # This will sleep for _at least_ a second, sleep 1 might not.
>         $$ . ":" . time;
>     }

 { sleep 1 } is supposed to sleep at least until second roll-over, i.e.
until time() returns a new value. That's what I gather from the docs,
anyway:

            On some older systems, it may sleep up to a full second
            less than what you requested, depending on how it counts
            seconds. Most modern systems always sleep the full
            amount.

"counting seconds", the old way, is subtracting new and old value of
time().

	Bart.


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

Date: 26 Apr 1999 05:37:51 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How do i print something using perl?
Message-Id: <3724500f@cs.colorado.edu>

In comp.lang.perl.misc, 
    ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
:Wow, what an informative error message!  open() has something to do
:with fork() only on systems with unfortunately primitive process
:starting API:

Ilya, please go soak your head.  Why do we have to listen to 
your ranting about why OS/2 is a Gift from God?  I am tired
of it.  You still don't get it, and never will, and won't shut up.

Just because you can't understand an elegant process model
when you see it doesn't mean that others can't.

--tom
-- 
        ``Imagination is more important than knowledge.''
				(A. Einstein)


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

Date: Mon, 26 Apr 1999 11:42:31 GMT
From: smnayeem@my-dejanews.com
Subject: Re: How do i print something using perl?
Message-Id: <7g1jf7$4vb$1@nnrp1.dejanews.com>

In article <37243162.647D77A3@gmx.net>,
  "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net> wrote:
> smnayeem@my-dejanews.com wrote:
> >
> > Does anyone know how i can direct the output of print statements to
> > the printer?
>
> Where's "the printer"? Attached to a serial port? Parallel port? Network
> connection? Served by lpd, or SMB, or some other method?
>
> Once you know where "the printer" is in your operating system and
> configuration, you'll probably know how to talk to it from Perl. Or if
> not, come back for help with more details.
>
> Cheers,
> Philip
>
my printer is on LPT1
when i try that pipe to lp or >LPT1 the printer blinks only and doesnt do
anything. what language might the printer be speaking? i just want to print
something thats all.
thanks
smnayeem

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 26 Apr 1999 13:07:00 GMT
From: Tzadik Vanderhoof <tzadikv@my-dejanews.com>
Subject: Re: How do i print something using perl?
Message-Id: <7g1odh$989$1@nnrp1.dejanews.com>

Try putting a "\n" at the end of every line you send to LPT1.  Then close it
at the end, like:

  open PRINTER, ">LPT1" or die "Can't write to printer\n";
  print PRINTER "Testing \n";
  print PRINTER "123 \n";
  close PRINTER;

If that doesn't work, try sending a form feed right before the "close"
statement with:

   print PRINTER "\x0C";   # <-- That's a zero not an oh

In article <7g1jf7$4vb$1@nnrp1.dejanews.com>,
  smnayeem@my-dejanews.com wrote:

> when i try that pipe to lp or >LPT1 the printer blinks only and doesnt do
> anything. what language might the printer be speaking?
> smnayeem

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 26 Apr 1999 13:37:54 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How do i print something using perl?
Message-Id: <37246c1f.377224@news.skynet.be>

Tom Christiansen wrote:

>Ilya, please go soak your head.  Why do we have to listen to 
>your ranting about why OS/2 is a Gift from God?  I am tired
>of it.  You still don't get it, and never will, and won't shut up.

Pot. Kettle. Black.

:-)

	Bart.


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

Date: Mon, 26 Apr 1999 09:59:05 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: MacPerl to AS (well, vice versa)
Message-Id: <pudge-2604990959050001@192.168.0.77>

In article <cwstern-2504992100220001@sparrow.riken.go.jp>,
cwstern@mitXYZZY.edu (Carl Stern) wrote:

# The problem is passing the variables along.  Do Script doesn't appear to
# permit any ARGV

It does.

  tell app "MacPerl"
    Do Script {"MacPerl::Reply(join ':', @ARGV)", 0, 1, 2, 3, 4, 5, 6, 7, 8}
  end

Hope that does it for you.  Note that other places to answer this question
include the newsgroup alt.comp.lang.applescript (which is for Mac
scripting in general, with a primary focus on AppleScript) and the MacPerl
mailing lists (http://www.macperl.org/).  This is an OK place to ask, but
your question has less of a chance of getting a good answer here.  :)

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 26 Apr 1999 13:21:39 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <7g1p93$p4k$2@info2.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 19 Apr 1999 13:21:06 GMT and ending at
26 Apr 1999 06:57:51 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" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  252 (46.5% of all posters)
Articles: 344 (21.6% of all articles)
Volume generated: 545.8 kb (19.9% of total volume)
    - headers:    253.6 kb (5,148 lines)
    - bodies:     285.8 kb (9,188 lines)
    - original:   217.2 kb (7,250 lines)
    - signatures: 6.2 kb (145 lines)

Original Content Rating: 0.760

Averages
========

Posts per poster: 1.4
    median: 1.0 post
    mode:   1 post - 180 posters
    s:      0.8 posts
Message size: 1624.7 bytes
    - header:     754.8 bytes (15.0 lines)
    - body:       850.6 bytes (26.7 lines)
    - original:   646.6 bytes (21.1 lines)
    - signature:  18.3 bytes (0.4 lines)

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

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

    4     3.7 (  2.6/  1.0/  1.0)  Jimx <jimx@metronet.com>
    4    13.7 (  2.7/ 11.1/  8.2)  Eric Castle <ecastle@nuance.com>
    4     8.6 (  3.3/  5.3/  1.0)  charles <charles@twcny.rr.com>
    4     7.3 (  3.5/  3.0/  2.8)  Anthony Baratta <Anthony@Baratta.com>
    4     7.9 (  3.2/  4.7/  3.3)  raylutz@adaptra.com
    4     4.2 (  2.7/  1.5/  1.4)  mikl_paris@my-dejanews.com
    4     4.7 (  2.5/  2.2/  1.8)  drbrain@ziemlich.org (markus)
    3     3.5 (  2.2/  1.3/  0.9)  jhelgesen@my-dejanews.com
    3     5.4 (  2.1/  3.3/  2.3)  Myke <myke98@my-dejanews.com>
    3     3.3 (  1.9/  1.5/  1.3)  "Philip Smeuninx" <philip.smeuninx@be.uunet.net>

These posters accounted for 2.3% of all articles.

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

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

  13.7 (  2.7/ 11.1/  8.2)      4  Eric Castle <ecastle@nuance.com>
   8.6 (  3.3/  5.3/  1.0)      4  charles <charles@twcny.rr.com>
   7.9 (  3.2/  4.7/  3.3)      4  raylutz@adaptra.com
   7.8 (  1.2/  6.5/  6.2)      2  John L Singleton <jsinglet@jaguar.ir.miami.edu>
   7.3 (  3.5/  3.0/  2.8)      4  Anthony Baratta <Anthony@Baratta.com>
   6.2 (  0.7/  5.5/  4.7)      1  "joeprogrammer" <joeprogrammer@aa.net>
   6.2 (  1.8/  4.4/  2.7)      2  Bryan Oakley <oakley@channelpoint.com>
   5.7 (  2.9/  2.8/  1.0)      3  kaz@ashi.FootPrints.net (Kaz Kylheku)
   5.7 (  2.0/  3.6/  2.1)      2  Robin Becker <robin@jessikat.demon.co.uk>
   5.6 (  1.6/  4.1/  3.3)      2  ebatutis@my-dejanews.com

These posters accounted for 2.7% of the total volume.

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

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

1.000  (  1.0 /  1.0)      4  Jimx <jimx@metronet.com>
0.944  (  2.8 /  3.0)      4  Anthony Baratta <Anthony@Baratta.com>
0.926  (  1.4 /  1.5)      4  mikl_paris@my-dejanews.com
0.862  (  1.3 /  1.5)      3  "Philip Smeuninx" <philip.smeuninx@be.uunet.net>
0.796  (  1.8 /  2.2)      4  drbrain@ziemlich.org (markus)
0.791  (  1.3 /  1.6)      3  Tony Demark <tpost@intelihealth.com>
0.744  (  8.2 / 11.1)      4  Eric Castle <ecastle@nuance.com>
0.712  (  3.3 /  4.7)      4  raylutz@adaptra.com
0.702  (  2.3 /  3.3)      3  Myke <myke98@my-dejanews.com>
0.701  (  1.9 /  2.7)      3  GoodfriB@jntf.osd.mil (James R. Goodfriend)

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

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

0.862  (  1.3 /  1.5)      3  "Philip Smeuninx" <philip.smeuninx@be.uunet.net>
0.796  (  1.8 /  2.2)      4  drbrain@ziemlich.org (markus)
0.791  (  1.3 /  1.6)      3  Tony Demark <tpost@intelihealth.com>
0.744  (  8.2 / 11.1)      4  Eric Castle <ecastle@nuance.com>
0.712  (  3.3 /  4.7)      4  raylutz@adaptra.com
0.702  (  2.3 /  3.3)      3  Myke <myke98@my-dejanews.com>
0.701  (  1.9 /  2.7)      3  GoodfriB@jntf.osd.mil (James R. Goodfriend)
0.674  (  0.9 /  1.3)      3  jhelgesen@my-dejanews.com
0.360  (  1.0 /  2.8)      3  kaz@ashi.FootPrints.net (Kaz Kylheku)
0.184  (  1.0 /  5.3)      4  charles <charles@twcny.rr.com>

13 posters (5%) had at least three posts.


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

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

      15  kaz@ashi.FootPrints.net (Kaz Kylheku)
      10  Grelbr <grelbr@his.log>
      10  Robin Becker <robin@jessikat.demon.co.uk>
      10  Bryan Oakley <oakley@channelpoint.com>
      10  Erez Zuler <zerez@netvision.net.il>
       5  Sunil Rao <sunil.rao@ic.ac.uk>
       5  "Bruce S. O. Adams" <bruce.adams@rmc-ltd.com>
       5  "Farzad Pezeshkpour" <fuzz@sys.uea.ac.uk>
       5  Martin Ambuhl <mambuhl@earthlink.net>
       5  Russell Harper <rharper@intouchsurvey.com>


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

Date: 26 Apr 1999 12:31:40 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie regex query
Message-Id: <37244e9c@newsread3.dircon.co.uk>

David Cantrell <NukeEmUp@ThePentagon.com> wrote:
> On Sat, 24 Apr 1999 08:00:15 -0400, tadmc@metronet.com (Tad McClellan)
> enlightened us thusly:
> 
>>Andy Elvey (andyelv@ibm.net) wrote:
>>
>>: !#/usr/bin/perl
>>  ^^
>>  ^^ transposed
>>
>>   Something tells me that we are not looking at the code
>>   that you are looking at.
> 
> If he's using a MS platform the shebang isn't necessary, so this could
> well be real code.
> 

Its still wrong though only a warning (with -w):

   Useless use of not in void context at blah.pl line 3.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Mon, 26 Apr 1999 13:49:57 +0200
From: "S.L. de Vries" <devries-devries@wxs.nl>
Subject: question about guestbook
Message-Id: <372452E5.E5799DF5@wxs.nl>

I'm from The Netherlands, so I hope you can understand this message.
Hello,

I've download a guestbook and changed the settings to  the settings of
my page.
But when I fill it in I get an error that I did not fill in my name, but

I did it.
When I first let the script check for the comments then I get an error
that I did not fill in my comments.
Does anyone know what the problem is?

Sjoerd.





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

Date: Mon, 26 Apr 1999 11:07:46 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Split sizes instead of pattern?
Message-Id: <372846f1.860074081@news.insnet.net>

On Sat, 17 Apr 1999 19:49:57 +0200, Mats Pettersson
<mats.pettersson@falukuriren.se> enlightened us thusly:

>A line in the file may look as follows:
>
>1999-01   6   4   2   1   7       5   3
>
>So the first field should be 7 characters the second 4 characters the
>third 4 characters and so on. Some of the fields might be empty (like
>the 7th in this example) so thats wy i just can't split with whitespace.
>
>Is there som sort of '@fields = split_size /7,4,4,4.../' command in
>perl?

split// and other regex-ish operations are not always the best
approach.

eg ...

$line='1999-01   6   4   2   1   7       5   3';
@fields=(substr($line, 0, 7));
for($index=7;$index<length($line);$index+=4)
  { push(@fields, substr($line, $index, 4));
  }

[Copying newsgroup posts to me by mail is considered rude]

-- 
David Cantrell, part-time Unix/perl/SQL/java techie
                full-time chef/musician/homebrewer
                http://www.ThePentagon.com/NukeEmUp


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

Date: 26 Apr 1999 13:21:39 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <7g1p93$p4k$1@info2.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 19 Apr 1999 13:21:06 GMT and ending at
26 Apr 1999 06:57:51 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" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

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

perlfaq-suggestions\@(?:.*\.)?perl\.com

Totals
======

Posters:  542
Articles: 1593 (648 with cutlined signatures)
Threads:  471
Volume generated: 2745.5 kb
    - headers:    1184.6 kb (23,891 lines)
    - bodies:     1452.0 kb (45,849 lines)
    - original:   1015.4 kb (34,075 lines)
    - signatures: 107.3 kb (2,315 lines)

Original Content Rating: 0.699

Averages
========

Posts per poster: 2.9
    median: 1.0 post
    mode:   1 post - 330 posters
    s:      8.2 posts
Posts per thread: 3.4
    median: 2 posts
    mode:   1 post - 135 threads
    s:      4.0 posts
Message size: 1764.8 bytes
    - header:     761.5 bytes (15.0 lines)
    - body:       933.3 bytes (28.8 lines)
    - original:   652.7 bytes (21.4 lines)
    - signature:  69.0 bytes (1.5 lines)

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

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

  105   213.1 ( 86.5/103.9/ 57.9)  David Cassell <cassell@mail.cor.epa.gov>
   92   154.2 ( 59.4/ 84.8/ 52.9)  lr@hpl.hp.com (Larry Rosler)
   71   104.3 ( 55.1/ 40.2/ 21.0)  Jonathan Stowe <gellyfish@gellyfish.com>
   61   106.4 ( 47.6/ 48.3/ 46.0)  abigail@fnx.com
   60   187.0 ( 50.3/129.2/114.5)  tchrist@mox.perl.com (Tom Christiansen)
   41    62.0 ( 23.8/ 38.2/ 23.9)  tadmc@metronet.com (Tad McClellan)
   27    42.8 ( 22.3/ 20.5/ 14.4)  bart.lateur@skynet.be (Bart Lateur)
   24    29.6 ( 18.4/ 11.1/  6.0)  Philip Newton <Philip.Newton@datenrevision.de>
   22    44.9 ( 18.3/ 19.8/  9.3)  Uri Guttman <uri@sysarch.com>
   20    26.7 ( 15.8/ 10.6/  7.1)  jglascoe@giss.nasa.gov

These posters accounted for 32.8% of all articles.

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

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

 213.1 ( 86.5/103.9/ 57.9)    105  David Cassell <cassell@mail.cor.epa.gov>
 187.0 ( 50.3/129.2/114.5)     60  tchrist@mox.perl.com (Tom Christiansen)
 154.2 ( 59.4/ 84.8/ 52.9)     92  lr@hpl.hp.com (Larry Rosler)
 106.4 ( 47.6/ 48.3/ 46.0)     61  abigail@fnx.com
 104.3 ( 55.1/ 40.2/ 21.0)     71  Jonathan Stowe <gellyfish@gellyfish.com>
  62.0 ( 23.8/ 38.2/ 23.9)     41  tadmc@metronet.com (Tad McClellan)
  44.9 ( 18.3/ 19.8/  9.3)     22  Uri Guttman <uri@sysarch.com>
  42.8 ( 22.3/ 20.5/ 14.4)     27  bart.lateur@skynet.be (Bart Lateur)
  33.9 ( 17.1/ 13.4/  9.7)     19  Daniel Grisinger <dgris@moiraine.dimensional.com>
  32.6 (  7.4/ 24.9/ 19.0)      9  snowhare@long-lake.nihongo.org (Benjamin Franz)

These posters accounted for 35.7% of the total volume.

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

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

1.000  (  1.0 /  1.0)      7  "Austin Ming" <austin95002887@yahoo.com>
0.952  ( 46.0 / 48.3)     61  abigail@fnx.com
0.896  ( 17.6 / 19.6)      8  agniora@usa.net
0.886  (114.5 /129.2)     60  tchrist@mox.perl.com (Tom Christiansen)
0.873  (  6.9 /  7.9)      5  aspinelli@ismes.it (Andrea LN Spinelli)
0.867  (  5.0 /  5.8)     10  fl_aggie@thepentagon.com
0.797  ( 14.6 / 18.3)     14  "Wayne Keenan" <tripix@tdi-net.freeserve.co.uk>
0.763  ( 19.0 / 24.9)      9  snowhare@long-lake.nihongo.org (Benjamin Franz)
0.723  (  9.7 / 13.4)     19  Daniel Grisinger <dgris@moiraine.dimensional.com>
0.702  ( 14.4 / 20.5)     27  bart.lateur@skynet.be (Bart Lateur)

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

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

0.519  (  3.3 /  6.3)      5  Jerome O'Neil <jeromeo@atrieva.com>
0.518  (  7.7 / 14.9)     17  Ala Qumsieh <aqumsieh@matrox.com>
0.470  (  9.3 / 19.8)     22  Uri Guttman <uri@sysarch.com>
0.460  (  5.3 / 11.5)     12  rjk@linguist.dartmouth.edu (Ronald J Kimball)
0.460  (  6.7 / 14.5)     19  danbeck@scott.net (Daniel Beckham)
0.454  (  0.9 /  2.0)      5  "Scott W" <swolfington@home.com>
0.407  (  4.9 / 12.0)     18  Eric Bohlman <ebohlman@netcom.com>
0.404  (  4.1 / 10.0)     14  merlyn@stonehenge.com (Randal L. Schwartz)
0.375  (  2.1 /  5.5)      7  Uri Guttman <uri@home.sysarch.com>
0.259  (  3.0 / 11.8)     10  "Wyzelli" <wyzelli@yahoo.com>

45 posters (8%) had at least five posts.

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

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

   25  Top 10 newbie errors?
   19  newbie with a "howto" question
   18  CGI programmer wanted
   18  last item in associative array.
   17  Is there a shorter way?
   17  How to make an array name to be a variable?
   16  Unix files in MacPerl
   16  The Future of Tk?
   16  Generating a unique string for order number
   14  Verifying text in a string

These threads accounted for 11.0% of all articles.

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

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

  67.3 (  2.3/ 64.5/ 64.1)      3  Compiling perl regex lib into other progs
  53.2 ( 18.0/ 32.7/ 20.8)     25  Top 10 newbie errors?
  38.7 ( 15.6/ 22.0/ 12.3)     16  The Future of Tk?
  33.6 ( 12.9/ 19.7/ 15.7)     16  Unix files in MacPerl
  33.3 ( 14.1/ 17.6/ 11.1)     17  How to make an array name to be a variable?
  32.7 ( 13.8/ 17.1/ 10.8)     19  newbie with a "howto" question
  32.6 (  7.6/ 24.4/ 19.5)     10  $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
  32.0 ( 12.0/ 18.2/ 13.5)     14  regex: I see THAT it works, but I don't see WHY
  32.0 ( 12.5/ 18.3/ 11.6)     16  Generating a unique string for order number
  30.9 (  5.5/ 24.6/ 19.0)      7  Problems with the connect function

These threads accounted for 14.1% of the total volume.

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

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

0.934  (  5.0/   5.3)      5  Getting file creation date using perl
0.877  ( 18.0/  20.5)     13  Problem with writing to file.
0.842  (  2.5/   2.9)      5  $ENV...Explained
0.836  (  5.8/   6.9)      6  See how you compare to our Top Ten list of perl programmers.
0.819  (  1.7/   2.1)      6  SNMP
0.813  (  3.8/   4.7)      6  Database file locking...
0.800  ( 15.7/  19.7)     16  Unix files in MacPerl
0.798  ( 19.5/  24.4)     10  $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
0.779  (  6.7/   8.5)      7  Suggestions and oneliners for Perl-talk?
0.779  (  3.7/   4.7)      6  Personal Web Server and Perl

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

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

0.473  (  8.9 / 18.7)     12  Is it REALLY impossible to install Perl on Windoze???
0.469  (  0.9 /  1.9)      5  ifeither--How about some feedback?
0.459  (  3.3 /  7.3)      9  How can I execute non cgi PERL script under NT?
0.459  (  4.9 / 10.8)      9  Wanna post, need programmer help
0.447  (  2.7 /  6.0)      5  FAQ 4.14: How can I find the Julian Day?
0.426  (  1.2 /  2.9)      5  Reading .ini files from Perl
0.423  (  0.7 /  1.7)      5  Extracting emails from array
0.366  (  1.1 /  3.0)      6  FAQ 3.9: Is there an IDE or Windows Perl Editor?
0.362  (  2.3 /  6.3)      7  NT/Processes/IDs
0.276  (  1.8 /  6.5)      5  Running CGI scripts OFFLINE

102 threads (21%) had at least five posts.

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

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

      35  comp.lang.c
      20  comp.lang.java.programmer
      19  comp.lang.perl.modules
      18  comp.lang.c++
      17  comp.lang.tcl
      17  comp.programming
      17  comp.software-eng
      16  comp.lang.python
      16  comp.lang.functional
      16  comp.lang.misc

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

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

      20  c8133594@comp.polyu.edu.hk
      15  kaz@ashi.FootPrints.net (Kaz Kylheku)
      10  Grelbr <grelbr@his.log>
      10  Robin Becker <robin@jessikat.demon.co.uk>
      10  Bryan Oakley <oakley@channelpoint.com>
      10  Erez Zuler <zerez@netvision.net.il>
      10  Barry Margolin <barmar@bbnplanet.com>
       5  fellowsd@cs.man.ac.uk (Donal K. Fellows)
       5  xidicone@iname.com
       5  "Farzad Pezeshkpour" <fuzz@sys.uea.ac.uk>


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

Date: Mon, 26 Apr 1999 15:45:46 +0200
From: Mike <ga-mic@netcologne.de>
Subject: system calls from Apache using perl
Message-Id: <37246E0A.D7812834@netcologne.de>

Can anyone help me with this one:

I am starting a cgi script with SSI from Apache 1.2.4
on RedHat Linux 5.0. This cgi script has got to run another
script - a bash script on the system ( /etc/ppp/ppp-on ).
The ppp-on script must go into the background. 

the perl command I am using for this is:

	system "/etc/ppp/ppp-on &";

When I run the perl script from the command line it works 
well but when I try to start it with a web browser from the 
Apache something goes wrong: 
The ppp-on script is started but after that the perl script 
does not continue  - so the web browser hangs.

Can you suggest any solution?


Thanks

Mike


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

Date: Sun, 25 Apr 1999 18:36:53 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: What is wrong with this picture?
Message-Id: <5e50g7.kl2.ln@magna.metronet.com>

Bas van Reek (basvreek@xs5all.nl) wrote:

: remove single quotes on line print <<'ending_print_tag';


   Nonsense.

   It is fine with the single quotes.

   That is not the problem.


: Brian Dodd <bd@albany.net> wrote in message news:3723A52B.22B0@albany.net...

: > print <<'ending_print_tag';
: > <html>
: > <head>
: > <title>Hello World</title>
: > <background= "#000000" text="#ff0000">
: > </head>
: > <body>
: > <h1>Hello World</h1>
: > <hr noshade>
: > </body>
: > </html>
: > ending_print_tag



--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sun, 25 Apr 1999 18:40:01 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: What is wrong with this picture?
Message-Id: <1k50g7.kl2.ln@magna.metronet.com>

Jimx (jimx@metronet.com) wrote:
: just a note
: I have found that there can be no spaces between the << and the 
: ending_print_tag statement.


   Right.


: Also each line should start in the first column 


   How can a line _not_ start in the first column?

   I think every line must start in the first column, since
   that is where you start lines.


print <<EOP;
   The data lines can start with spaces without problems though.
EOP


: especially the
: ending_print_tag
: line. If there's a space before the tag you'll get an error.


   Right again.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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