[16280] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3692 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 17 11:05:44 2000

Date: Mon, 17 Jul 2000 08:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963846311-v9-i3692@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 17 Jul 2000     Volume: 9 Number: 3692

Today's topics:
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Philip Lees)
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Randal L. Schwartz)
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <cal@iamcal.com>
    Re: different namespace for functions from a library? <nospam@nospam.com>
        How to get the machine (archtechture) type in Perl? <jong@ebi.ac.uk>
    Re: How to get the machine (archtechture) type in Perl? (NP)
        How to kill Win95 process <sebastien.cottalorda1@libertysurf.fr>
        Installing ActivePerl : Problem <jan.buys@mcd.alcatel.be>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Newbie needs help! (Keith Calvert Ivey)
    Re: Newbie needs help! <mauldin@netstorm.net>
    Re: Newbie: iterated reading from file (Bernard El-Hagin)
    Re: Newbie: Reading in file contents <nospam@nospam.com>
        Out of Memory (James McCallum)
    Re: Out of Memory newsposter@cthulhu.demon.nl
    Re: Perl and Mysql <dfleet@avaterra.com>
    Re: perl makemaker tutorial (Anno Siegel)
    Re: Perl Rocks!(OT?) (Nobody)
        Please help me this this suzbik@btinternet.com
    Re: Qs for professional Perl/CGI developers (Nobody)
    Re: Redirect External Program's output on Windows ? joerg@sql.de
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: The problem of two Submit buttons <lr@hpl.hp.com>
        Warnings in taint check miko@idocs.com
        WHERE is libnet????? <kj0@mailcity.com>
    Re: WHERE is libnet????? <Thomas.Rassmann@sdm.de>
    Re: WHERE is libnet????? <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 17 Jul 2000 13:11:30 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <3972fea9.20578229@news.grnet.gr>

On Fri, 14 Jul 2000 02:57:40 -0500, Nnickee <nnickee@nnickee.com>
wrote:

>RTFM responses are GOOD responses for a couple of reasons. 

I agree that referring newbies to the documentation is a good idea in
general, for the reasons you give. In fact, some of the responders to
my question pointed me at a doc I hadn't read, and that was very
helpful, as I acknowledged at the time.

However, if the newbie in question has already read the relevant
section of the docs, and says so explicitly, then referring him/her
back to the same place with no extra comment is unlikely to be very
helpful.

>Was the post of yours that you referred to above the "strange behavior
>in upper case conversion" question?  I seem to remember a *lot* of
>good answers to that one.

Yes it was, and yes I got some helpful answers. I wasn't trying to
suggest that everybody responds in the same way. The specific response
I objected to was as follows:

>Errr, you know that this is equivalent to:
>
>$name =~ tr/a-z/A-Z/;
>
>right?  Because you read the documentation in the perlop page of the
>manual for the bind operator, tr///, and s///, right?
>
><Snipped the evidence that you have *not* read the proper documentation,
>but would rather have someone else read it for you, and regurgitate.>
>
>Whoops...
> 
>> I'm sure this will seem quite simple to you gurus.
>
>It's quite simple for anyone who RTFM.

Given that I had read the relevant sections of perlop and said so,
what is the point in posting offensive, supercilious crap like this?
Talk about wasting bandwidth.

>>I'm struggling on with Perl, but I don't expect to get any help from
>>this newsgroup.
>
>And you won't, if you say stuff like that.  You'll get back from this
>group what you put into it.  If you follow the conventions and
>"standards", you'll be rewarded with all the help you need.

Yeah, OK. Maybe that was too much 'attitude'.

>I don't think you (and many others, not just picking on you here)
>realize what a terrific resource this newsgroup is.  
<snip>
>The very least that we, the beginners, the askers, can do is to follow
>the Guru's "rules" since we're asking them to give us for free what
>they could very well charge us for (answers, advice, code snippets,
>etc.).

I _always_ follow the rules (lurk, etc.) and this time was no
exception.

Phil
--
Philip Lees
ICS-FORTH, Heraklion, Crete, Greece
Ignore coming events if you wish to send me e-mail
'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer


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

Date: 17 Jul 2000 06:34:46 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <m13dl8dgnd.fsf@halfdome.holdit.com>

>>>>> "Philip" == Philip Lees <pjlees@ics.forthcomingevents.gr> writes:

Philip> I agree that referring newbies to the documentation is a good idea in
Philip> general, for the reasons you give. In fact, some of the responders to
Philip> my question pointed me at a doc I hadn't read, and that was very
Philip> helpful, as I acknowledged at the time.

Philip> However, if the newbie in question has already read the relevant
Philip> section of the docs, and says so explicitly, then referring him/her
Philip> back to the same place with no extra comment is unlikely to be very
Philip> helpful.

I think you'll find that experts generally do pick up on the
questioner having said "I've read X Y Z, and here's what I don't get
about that".  First, that's pretty rare, and second, it would be even
rarer to get a flat "RTFM" once that has happened. :)  I challenge
you to pick out the 1% of the cases that are like that against the
normal 99% of the cases.  Go ahead.  Deja.com is your friend. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 17 Jul 2000 15:34:54 +0100
From: "Cal Henderson" <cal@iamcal.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <2QEc5.3043$Pj1.71511@news2-win.server.ntlworld.com>


"Drew Simonis" <care227@attglobal.net> wrote:

: I got excited when Kibo sent me email.  But I was far more excitable
: then.

You got mail form kibo? wow.


--
Cal Henderson

sub a{my$a=reverse shift;$a=~y/b-z/a-y/;unshift@a,$a;}sub b{$c.=reverse
shift; while(length($c)>=$b[0]){a(substr($c,0,$b[0]));$c=substr($c,$b[0]);
shift@b;}}@b=(6,3,5,4,10,6,4,4,2,1);$a="l?jouipv"."ezvmxpbuxih";$a.=
",jofoqqibmzamsfsfxfjtuiIg";while($a ne ""){b(substr($a,0,2));$a=
substr($a,2);}print join(" ",@a);




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

Date: 17 Jul 2000 15:02:29 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: different namespace for functions from a library?
Message-Id: <8kv765$1c7$1@216.155.32.56>

In article <396F16CD.D5EC0D50@hotmail.com>, "Alex T." 
<samara_biz@hotmail.com> wrote:

 | Hi,
 | I have a question and I really hope someone can give me the right
 | asnwer.
 | 
 | I had a script, which was working just right:
 | 
 | my %Replacements;
 | $Resplacements{TEST} = '<p>test</p>;

note that Replacements != Resplacements (spelling/typo problem)

 | ...
 | sub displayPage{
 | ...
 |  while( $line = <FILE> ){
 |   foreach my $name (keys %Replacements) {
 |    $line =~ s/<!-- REPLACE.$name -->/$Replacements{$name}/i;
 |   } #foreach
 |   $Response->Write($line);
 |  } #while
 | ...
 | }
 | 
 | After I moved displayPage() into a library called asp.pl, this function
 | stopped working correctly.
 | 
 | my script now looks like:
 | 
 | require "/some/path/to/asp.pl";
 | 
 | my %Replacements;
 | $Resplacements{TEST} = '<p>test</p>;
 | ....
 | &displayPage('apage.html');
 | 
 | If I remove "my" from "my %Replacements" it works ok again. Could
 | someone explain what difference it makes? Does it have anything to do
 | with namespaces? I thought functions from a library are imported into
 | the main namespace.., so "my ..." should have worked just fine.
 | 
 | Thanks!!!
 | 
 | Alex
 |

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Mon, 17 Jul 2000 16:55:27 +0100
From: "J. H. Park" <jong@ebi.ac.uk>
Subject: How to get the machine (archtechture) type in Perl?
Message-Id: <39732C6F.F426A944@ebi.ac.uk>

**** Post for FREE via your newsreader at post.usenet.com ****

Hi

I want to tell if the machine I am in
is a LINUX or SGI IRIX.

Is there an easy way to do so in Perl?
Or is there Shell variable already
defined?


Thanks,

Jong

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
                      http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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

Date: Mon, 17 Jul 2000 14:56:01 GMT
From: nvp@spamnothanks.speakeasy.org (NP)
Subject: Re: How to get the machine (archtechture) type in Perl?
Message-Id: <58Fc5.93716$t91.626419@news4.giganews.com>

On Mon, 17 Jul 2000 16:55:27 +0100, J. H. Park <jong@ebi.ac.uk> wrote:
: 
: I want to tell if the machine I am in
: is a LINUX or SGI IRIX.

Check the 'perlvar' man page.

-- 
Nate II



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

Date: Mon, 17 Jul 2000 16:43:34 +0100
From: "Sébastien Cottalorda" <sebastien.cottalorda1@libertysurf.fr>
Subject: How to kill Win95 process
Message-Id: <8kv625$jd3$1@news2.isdnet.net>

Hi all,

I manage to fork Win95 process, but now I've problem killing (or exiting) my
program.

I'd like that parent dies when child dies.
I've tried  :    waitpid($pid,0)

But it doesn't seem to work : the child ever die before parent in my
program.

I would like to know how my child can kill the parent (I didn't get getppid
works at yet).

Any clue is appreciate.

S2bastien




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

Date: Mon, 17 Jul 2000 16:16:01 +0200
From: Jan Buys <jan.buys@mcd.alcatel.be>
Subject: Installing ActivePerl : Problem
Message-Id: <39731520.60EEBB53@mcd.alcatel.be>

This is a multi-part message in MIME format.
--------------F76245EA0EBABF5137CF9E2B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi all,

I'm trying to install ActivePerl (which I downloaded from the official
Activestate site), but I cannot get the MS Windows installer to work,
which is needed to install the .msi file to which the perl distribution
is packed.
Anyone with the same problem, and ... eh ... solution of course ?

Thanks in advance...

--------------F76245EA0EBABF5137CF9E2B
Content-Type: text/x-vcard; charset=us-ascii;
 name="jan.buys.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan Buys
Content-Disposition: attachment;
 filename="jan.buys.vcf"

begin:vcard 
n:Buys;Jan
tel;work:+32-3-450.30.12
x-mozilla-html:FALSE
org:Alcatel Bell - RCD - VG24
adr:;;;;;;
version:2.1
email;internet:jan.buys@mcd.alcatel.be
title:Tools & Methodology
x-mozilla-cpt:;2320
fn:Jan Buys
end:vcard

--------------F76245EA0EBABF5137CF9E2B--



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

Date: Mon, 17 Jul 2000 14:15:11 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <sn657f6oo5360@corp.supernews.com>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 10 Jul 2000 15:14:17 GMT and ending at
17 Jul 2000 23:34:01 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) 2000 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:  275 (46.4% of all posters)
Articles: 561 (27.4% of all articles)
Volume generated: 959.2 kb (27.3% of total volume)
    - headers:    453.5 kb (8,829 lines)
    - bodies:     494.2 kb (17,598 lines)
    - original:   358.0 kb (13,355 lines)
    - signatures: 10.9 kb (224 lines)

Original Content Rating: 0.724

Averages
========

Posts per poster: 2.0
    median: 1 post
    mode:   1 post - 176 posters
    s:      3.1 posts
Message size: 1750.8 bytes
    - header:     827.7 bytes (15.7 lines)
    - body:       902.2 bytes (31.4 lines)
    - original:   653.5 bytes (23.8 lines)
    - signature:  19.9 bytes (0.4 lines)

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

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

   44    70.1 ( 40.5/ 29.6/ 20.1)  p3rlc0dr@my-deja.com
   14    20.1 ( 12.4/  7.6/  3.9)  "Ecco" <ecco64@chello.nl>
   10    18.3 (  9.1/  9.2/  6.2)  "Alex T." <samara_biz@hotmail.com>
    9    12.9 (  8.4/  4.5/  3.1)  James Mauldin <mauldin@netstorm.net>
    9    15.4 (  8.4/  6.9/  3.7)  "Cal Henderson" <cal@iamcal.com>
    9    18.2 (  7.5/ 10.6/  6.1)  dejajason@my-deja.com
    8    13.3 (  7.3/  4.8/  2.4)  Ilmari Karonen <usenet11149@itz.pp.sci.fi>
    8    11.9 (  7.3/  4.6/  3.6)  Marc Schaefer <marc.schaefer@warwick.ac.uk>
    8    10.3 (  4.2/  6.1/  4.7)  Alan Page <alandpage@aol.comnospam>
    8    16.9 (  8.0/  9.0/  3.8)  "Alejandro Kurczyn" <akurczyn@usa.net>

These posters accounted for 6.2% of all articles.

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

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

  70.1 ( 40.5/ 29.6/ 20.1)     44  p3rlc0dr@my-deja.com
  24.7 (  0.7/ 24.0/ 22.4)      1  Michelle Dawkins <surinder@my-deja.com>
  20.1 ( 12.4/  7.6/  3.9)     14  "Ecco" <ecco64@chello.nl>
  18.3 (  9.1/  9.2/  6.2)     10  "Alex T." <samara_biz@hotmail.com>
  18.2 (  7.5/ 10.6/  6.1)      9  dejajason@my-deja.com
  16.9 (  8.0/  9.0/  3.8)      8  "Alejandro Kurczyn" <akurczyn@usa.net>
  15.4 (  8.4/  6.9/  3.7)      9  "Cal Henderson" <cal@iamcal.com>
  14.0 (  4.5/  9.5/  8.8)      6  joerg@sql.de
  13.3 (  7.3/  4.8/  2.4)      8  Ilmari Karonen <usenet11149@itz.pp.sci.fi>
  13.2 (  4.9/  8.3/  2.6)      5  Bill Webster <billw@dal.asp.ti.com>

These posters accounted for 6.4% of the total volume.

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

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

1.000  (  2.5 /  2.5)      3  Sean Lavelle <slavelle@concentus-tech.com>
0.984  (  1.0 /  1.0)      3  Tom <chaptera@hotmail.com>
0.979  (  2.1 /  2.1)      3  The WebDragon <nospam@nospam.com.invalid>
0.962  (  2.0 /  2.1)      3  "Simon Armstrong" <Simon.Armstrong@nojunkmail.uk.origin-it.com>
0.923  (  8.8 /  9.5)      6  joerg@sql.de
0.912  (  3.7 /  4.1)      3  Haazi2 <haazi2@aol.com>
0.860  (  1.2 /  1.4)      3  Antony <mcnultya@nortelnetworks.com>
0.848  (  1.8 /  2.1)      4  tbalazs-this-must-go@netcomuk.co.uk
0.826  (  2.1 /  2.6)      3  rhys <rhys.tucker@dtn.ntl.com>
0.823  (  5.3 /  6.5)      6  jason iversen <jasoniversen@my-deja.com>

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

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

0.486  (  0.5 /  1.1)      3  Cameron Kennedy <kenned57@pilot.msu.edu>
0.452  (  1.5 /  3.2)      4  Nobody <nobody@contract.Sun.COM>
0.435  (  2.7 /  6.2)      5  Russell Smallwood <rsmallwood@mindspring.com>
0.434  (  3.2 /  7.4)      5  kmhanser@my-deja.com
0.425  (  3.8 /  9.0)      8  "Alejandro Kurczyn" <akurczyn@usa.net>
0.403  (  2.2 /  5.4)      4  Pasquale <pdmos23@geocities.com>
0.365  (  0.7 /  2.0)      3  "Konstantin Stupnik" <skv@iis.nsk.su>
0.340  (  0.8 /  2.3)      4  John <john99@NOSPAMcanada.com>
0.316  (  2.6 /  8.3)      5  Bill Webster <billw@dal.asp.ti.com>
0.260  (  0.9 /  3.6)      3  "John" <john@nomailplease>

54 posters (19%) had at least three posts.

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

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

      52  alt.perl
      36  comp.lang.perl
      29  comp.lang.perl.modules
      10  comp.lang.javascript
       8  alt.html
       7  alt.perl.sockets
       6  alt.html.editors.toppage
       5  comp.programming
       5  comp.os.linux.misc
       5  comp.sys.sun.apps

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

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

      12  Greg Treece <gtreece@vhbtech.com>
       8  kmhanser@my-deja.com
       6  Tom <chaptera@hotmail.com>
       4  Steffen Beyer <sb@muccpu1.muc.sdm.de>
       3  NO_SPAM
       3  "Jamie" <jamcquay@BOOM.hotmail.com>
       3  spike1@freenet.co.uk
       3  Alan Coopersmith <alanc@alum.calberkeley.org>
       3  "Alex T." <samara_biz@hotmail.com>
       3  "Konstantin Stupnik" <skv@iis.nsk.su>


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

Date: Mon, 17 Jul 2000 13:00:58 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Newbie needs help!
Message-Id: <397d02ce.63824285@news.newsguy.com>

Jim Mauldin <mauldin@netstorm.net> wrote:
>Jim Mauldin wrote:
>
>> ($link, $descr) = (/\[(.*?)]/g);
>
>($link, $descr) = /\[(.*?)]/g;
>
>Correction:  parens not needed in /\[(.*?)]/g.  ($link, $descr) supplies
>the list context.  (For my own edification, really).

Yes, but then you'll get the brackets included in $link and
$descr.

It's impossible to tell, but my interpretation is that the
brackets in the original post weren't intended as literals.  
I think what's needed is just

    my($link, $descr) = split /\t/;

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
(Free at last from the forced spamsig of
Newsfeeds.com, cursed be their name)


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

Date: Mon, 17 Jul 2000 14:30:44 GMT
From: Jim Mauldin <mauldin@netstorm.net>
Subject: Re: Newbie needs help!
Message-Id: <397317C6.CFF4F6A7@netstorm.net>

Keith Calvert Ivey wrote:

> Jim Mauldin <mauldin@netstorm.net> wrote:
>
> >($link, $descr) = /\[(.*?)]/g;
> >
> Yes, but then you'll get the brackets included in $link and
> $descr.
>

Not so.  perldoc perlop, and try it on $_ = "[www.perl.org]\t[A Perl site]";
It only returns what's inside the ( ) after matching the whole expression.


> It's impossible to tell, but my interpretation is that the
> brackets in the original post weren't intended as literals.
> I think what's needed is just
>
>     my($link, $descr) = split /\t/;
>

This is probably what he meant.

-- Jim




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

Date: Mon, 17 Jul 2000 13:15:27 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Newbie: iterated reading from file
Message-Id: <slrn8n61er.90q.bernard.el-hagin@gdndev25.lido-tech>

Tony Balazs <tbalazs-this-must-go@netcomuk.co.uk> wrote:
><snip>
>What I actually want to achieve is this, to turn:
>>>
>>>(100, Analyst, $40K, Permanent);  # or 100,Analyst,$40K,Permanent
>>>(200, Programmer, $50K, Contract); # ditto
>>>
>>>into
>>>
>>>text1 100  text2 Analyst text3 $40K text4 Permanent
>>>text1 200 text2 Programmer text3 $50K text4 Contract
>>
>>Here's one way which assumes that there are no commas in the data
>>itself:
>
><snip>
>
>Bernard,
>with the the following adaptation of your code:
>
>#!/usr/bin/perl -w
>use strict;
>
>open(UPDATE, "update.dat");
>
>my $i = 1;
>
>while (my $data = <UPDATE>){
>	chomp ($data);
>	$data =~ s/^\((.*)\);/$1/g;
>	my @data = split /,/, $data;
>	foreach (@data)
>	{
>		print "text" . $i++ . " $_ ";
>	}
>	print "\n";
>	$i = 1;
>}
>close(UPDATE);
>
>I'm getting the following error message:
>global symbol "@data" requires explicit package name at filename.pl
>line 8.

Are you sure the code producing the error is *exactly* the code you quote
above? I just copied and pasted it and it works. That error would pop up
if there was no "my" before @data, but there is. Something else wrong
with my script, though, I forgot to take care of those comments in your
data. You need to add this line...

$data =~ s/#.*$//;

 ...right after the chomp.

Bernard
--
perl -e'@x=(3,2,4,1,3,2,1,3,1,3,2,3,3,2,3,0,0,1,2,1,1,1,4,1,2,1,1,2,2,1,
2,1,2,1,2,1,2,1,1,1,2,1,0,0,3,2,3,2,3,2,1,1,1,1,1,2,4,2,3,2,1,2,1,0,0,1,
2,1,1,1,4,1,2,1,1,1,2,2,1,1,4,1,1,1,2,1,1,1,2,1,0,0,3,2,4,1,1,2,1,1,1,3,
1,1,1,4,1,1,1,2,1,1,3,0,0);sub x{print q x$xx$_;print q x x x shift@x};#
while(defined($_=shift @x)){s o0o\no;$_!=0?x:print}' #Symmetry yrtemmyS#


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

Date: 17 Jul 2000 14:57:26 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Newbie: Reading in file contents
Message-Id: <8kv6sm$1c7$0@216.155.32.56>

In article <7aem4wkdx9.fsf@merlin.hyperchip.com>, Ala Qumsieh 
<aqumsieh@hyperchip.com> wrote:

 | Antony <mcnultya@nortelnetworks.com> writes:
 | 
 | > Tony Balazs said...
 | > > $jobs = <JOBS>;
 | > 
 | > replace that line with:
 | > 
 | > @jobs = <JOBS>;
 | > 
 | > > print $jobs;
 | > > print "\n";
 | > 
 | > replace those two lines with:
 | > 
 | > print join("\n", @jobs);
 | 
 | Each entry in @jobs already ends with "\n". Your code will have
 | alternating empty lines.

not if you replace 

    @jobs = <JOBS>;

with

    chomp(@jobs = <JOBS>); #need those parens!

:)

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Mon, 17 Jul 2000 14:31:58 GMT
From: james.mccallum@bradford.gov.uk (James McCallum)
Subject: Out of Memory
Message-Id: <39731856.24126671@newscore.theplanet.net>

Hi,
I'm running a perl script and I'm getting the
message 'out of memory'
I've check my ulimit which is currently set
at 2097151 which should be buckets of
space for files.  Anyone any thoughts??
James


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

Date: 17 Jul 2000 14:58:12 GMT
From: newsposter@cthulhu.demon.nl
Subject: Re: Out of Memory
Message-Id: <8kv6u4$lm6$1@internal-news.uu.net>

James McCallum <james.mccallum@bradford.gov.uk> wrote:

> I'm running a perl script and I'm getting the
> message 'out of memory'
           ^^^^^^^^^^^^^
> I've check my ulimit which is currently set
> at 2097151 which should be buckets of
> space for files.  Anyone any thoughts??
            ^^^^^
What has the maximum size of files you're allowed to create
got to do with memory usage?

ulimit: sets or  reports  the  file-size  writing
     limit  imposed  on  files written by the shell and its child
     processes (files of any size may be read).

limit: set or get limitations on the  sys-
     tem resources available to the current shell and its descen-
     dents

Check limit instead of ulimit...

Erik



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

Date: Mon, 17 Jul 2000 14:42:49 +0100
From: "David Fleet" <dfleet@avaterra.com>
Subject: Re: Perl and Mysql
Message-Id: <39730d90_1@nnrp1.news.uk.psi.net>

Sorry about multiple postings, had a network/mail problem.
Thankyou for replying.
 Code :--
----------------------------------------------------------------
#!/usr/bin/perl -w



print "Content-type: text/html\n\n";


use DBI;

@fdf= DBI->available_drivers;
$fdf=@fdf;

for($a=0;$a<$fdf;$a++){
    print "<BR>$a @fdf[$a]";
   }


$path = "DBI:mysql:test2:localhost";
$user = "MYUSERNAME";
$pswd = "PASSWORD";

$dbh = DBI->connect($path,$user,$pswd);

$dbq = $dbh->prepare("select * from books");
-----------------------------------------------------------------
In my 'error_log' file, it says :-
"Can't connect to local MySQL server through socket /tmp/mysql.sock"

I can use mysql from the Linux command line and do everything it's meant to
do.
No problem with that.
Just not with a Perl script.

Different sources say,use "use Mysql", whereas others say "use DBI";

What can I do??

Han.


"Thorbjørn Ravn Andersen" <thunderbear@bigfoot.com> wrote in message
news:3972F455.F279F7E2@bigfoot.com...
> David Fleet wrote:
> >
> > I am having serious problems trying to get my Perl script to connect to
my
> > Mysql database.
>
> Can have many reasons.  What errors do you see?
>
> --
>   Thorbjørn Ravn Andersen         "...plus...Tubular Bells!"
>   http://bigfoot.com/~thunderbear




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

Date: 17 Jul 2000 13:20:28 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perl makemaker tutorial
Message-Id: <8kv16s$evc$1@lublin.zrz.tu-berlin.de>

Trent Mankelow <trent.mankelow@unisys.com> wrote in comp.lang.perl.misc:
>Does anyone know of a good ExtUtils::MakeMaker tutorial with lots of
>examples?

I don't know of any such tutorial, but examples are easy to come by.
Most modules on CPAN contain one.

Anno


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

Date: 17 Jul 2000 13:29:42 GMT
From: nobody@contract.Sun.COM (Nobody)
Subject: Re: Perl Rocks!(OT?)
Message-Id: <8kv1o6$lor$1@eastnews1.east.sun.com>

In article <396F18B7.3950FF6F@home.com>,
Michael Carman  <mjcarman@home.com> wrote:
>Rage Matrix wrote:
>> [...] how many programmers here work solely with Perl 
>
>I work in Perl, Ada, C, a few other scripting languages peculiar to
>specific applications, and will need to learn some Python soon.
>(*ducking*) It's all about which tool fits the task at hand.
>

Wow, someone else who knows Perl and Ada!  I thought I was the only one,
since most people look at me funny a go "Huh?" when I mention Ada (I
used to program tanks in a former life :-)  

>> How long did you code in Perl before you became quite proficent in
>> it?
>
>Aw, heck, I'm still learning. I *thought* I was pretty decent after six
>months. I was a crude hack then. (I like to think of myself as an
>elegant hack now.)
>

Every time I start to consider myself an 'expert', I read something in this
group that makes me feel like a newbie again.  Some of these folks are simply
Perl deities :-)


>> Is the mindset for Perl different from OO languages like C++ and 
>> Java? i.e. Is there a different logic that helps you solve Perl
>> problems faster?
>
>I'm not really qualified to comment on this as I don't work with C++ or
>Java, but to generalize it to any old language: Yes, there is a
>different approach to doing things in Perl, due to the different
>features of the language. e.g. a transitioning C programmer tends to
>write loops like this:
>

Having worked with all of the above, I agree that there are different 
approaches to take.  I have found that Perl (with the advent of version
5) lends itself quite nicely to the OO design model.  


Anita




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

Date: Mon, 17 Jul 2000 13:06:35 GMT
From: suzbik@btinternet.com
Subject: Please help me this this
Message-Id: <8kv0cf$l9h$1@nnrp1.deja.com>

Hello,

I have been working on this script but i cannot get it to work properly.

The idea is that the customer enters their reference number and password
and the script looks it up from a flat file database.

The problem is that when i type in a reference number it will only find
the details if the reference number is 10233 (which is the first row)
if i try others then it doesnt work.

can someone tell me why?

The script is at: http://www.neighbourscan.co.uk/cgi-bin/check.pl
To see what it should look like enter 10233 as the ref number and the
passwod doesnt matter as i have not made it check that yet.

The code is at: http://www.neighbourscan.co.uk/check.txt
and the database is at: http://www.neighbourscan.co.uk/check-db.txt

Thankyou

Ben Periton


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 17 Jul 2000 14:25:31 GMT
From: nobody@contract.Sun.COM (Nobody)
Subject: Re: Qs for professional Perl/CGI developers
Message-Id: <8kv50r$n9p$1@eastnews1.east.sun.com>

In article <slrn8muvgu.eq3.tadmc@magna.metronet.com>,
Tad McClellan <tadmc@metronet.com> wrote:
>On 14 Jul 2000 20:01:45 GMT, Nobody <nobody@contract.Sun.COM> wrote:
>>>On Fri, 14 Jul 2000 00:01:47 GMT, Pjtg0707 <Pjtg0707@Netscape.net> wrote:
>>>
>
>>>>What is the general going rate for a Perl developer?
>>>
>>>
>>It varies.
>
>>Note:  This is in the Boston area, where the demand is so high (for Perl
>>and anything web-related) that I could employ a dozen or so
>>of me...if only I could clone myself :-)
>
>
>One of my clients is in the Boston area.
>
>They looked for Perl programmers (with some help from me and from
>headhunters) for about six months, then gave up and had me come 
>teach Perl to several of their employees instead.
>
>Boston must be hot for Perl programmers...
>
>
Blazing :-)  Which makes a consultant like myself do a great
big happy dance, since I remember back to 1992 in this area
when I was unemployed for 8 months, along with many thousands
of others.  I have been (figuratively speaking) fighting the
recruiters/potential employers off with a stick.  I had to take
my phone number off of my resume (which is only posted on one 
consultants' web site) because my answering machine was full
every day.  It was nice to have the work come looking for me, not
to mention being quite a boost to the ego :-)  

The market is so hot here that companies are happy to get a warm body 
with half a clue.  It's a great place to break into the field if you 
have only a little experience.  Don't know how long it's going to last, 
though,so I'm taking on as much work as I can handle and making the $$ 
while they're still flowing freely. But if the rate of new construction
and low office vacancies is anything to go by, it looks like things will
be pretty good for a while.  Sun Microsystems (one of my contracts) has
built 4 huge building for their campus, and is starting on the next 4. 
They have something like 200 job openings here, and are paying premiums
to employees who refer engineers/developers.  Cisco Systems just bought
a huge parcel of land in the 'burbs to build an east coast campus.  And 
there are dozens of networking/internet startups springing up all over.
All in all, it's a good time to be a geek in New England :-)

Anita


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

Date: Mon, 17 Jul 2000 14:16:41 GMT
From: joerg@sql.de
Subject: Re: Redirect External Program's output on Windows ?
Message-Id: <8kv4fn$okc$1@nnrp1.deja.com>

Greetings !

I post this result message in order to get it archived
for all those later having a similar problem ...

In article <8knboc$guc$1@nnrp1.deja.com>,
  joerg@sql.de  [ = I myself ] wrote:
>
> [...]
>
> I have a set of test program sources. The Perl script is to
> compile, link, and then run each of these programs.
> I need to store the STDOUT and STDERR (several of these tests
> intentionally  produce run time error messages) into a protocol file
> specific for the test case.

In Bourne-shell syntax that is
   $test_program > $test_protocol 2>&1

On Unix platforms, you can build that up in a string and simply
call "system" with this string - it works as desired.

On Win platforms (Win NT 4, with "ActivePerl" 5.6, trying both
"cmd.exe" and the "zsh" via "$PERL5SHELL"), this redirection fails.

My (simplified) solution to overcome this Win deficiency is:

    open STDERR, "> $errfile" ; # specific for test
    $output_text = `$test_prog` ;
    $rc = $? ;

    open STDERR, ">&STDOUT" ; # reset for Perl script
    if ( ! open ( FILE_ERR , $errfile ) ) {
        warn "Cannot open '$errfile'" ; }
    else {
        $output_text .= join ( "", <FILE_ERR> );
        close ( FILE_ERR ); }
    unlink ( "$errfile" );

Now "$output_text" contains the program's stdout followed
by its stderr, that can be analyzed, written to file etc.


Explicitly, I want to state that the backticks just provide
"standard output" of the external program, not "standard error".

As regards the proposal to use "open3": Thank you, but in
"Programming Perl" it is explicitly stated (2nd edition, p. 344):
  "As it is, the Open2 and Open3 modules are unlikely
  to work anywhere except on a UNIX system, or some
  other system purporting to be POSIX compliant."
And I simply do not trust any NT claims to be POSIX compliant ;-)


Again, thank you for all your hints !

Joerg Bruehe

--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 17 Jul 2000 14:15:06 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <sn657asso53167@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 10 Jul 2000 15:14:17 GMT and ending at
17 Jul 2000 23:34:01 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) 2000 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:  593
Articles: 2050 (746 with cutlined signatures)
Threads:  506
Volume generated: 3511.7 kb
    - headers:    1679.0 kb (32,590 lines)
    - bodies:     1723.7 kb (60,151 lines)
    - original:   1091.3 kb (41,652 lines)
    - signatures: 107.0 kb (2,335 lines)

Original Content Rating: 0.633

Averages
========

Posts per poster: 3.5
    median: 1 post
    mode:   1 post - 338 posters
    s:      7.6 posts
Posts per thread: 4.1
    median: 3.0 posts
    mode:   1 post - 133 threads
    s:      8.7 posts
Message size: 1754.1 bytes
    - header:     838.7 bytes (15.9 lines)
    - body:       861.0 bytes (29.3 lines)
    - original:   545.1 bytes (20.3 lines)
    - signature:  53.5 bytes (1.1 lines)

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

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

   79   161.6 ( 62.8/ 87.9/ 54.3)  Tad McClellan <tadmc@metronet.com>
   79   118.3 ( 68.5/ 49.8/ 25.2)  Drew Simonis <care227@attglobal.net>
   72    96.7 ( 61.8/ 34.3/ 21.1)  Bart Lateur <bart.lateur@skynet.be>
   56   100.3 ( 47.1/ 50.9/ 24.1)  jason <elephant@squirrelgroup.com>
   44    70.1 ( 40.5/ 29.6/ 20.1)  p3rlc0dr@my-deja.com
   39    54.5 ( 23.8/ 23.7/ 14.1)  Craig Berry <cberry@cinenet.net>
   39    76.4 ( 34.0/ 31.6/ 30.8)  The WebDragon <nospam@nospam.com>
   36    63.5 ( 26.8/ 29.0/ 25.6)  abigail@delanet.com
   33    53.1 ( 21.9/ 27.4/ 12.6)  Larry Rosler <lr@hpl.hp.com>
   31    60.1 ( 35.1/ 19.2/ 11.6)  Keith Calvert Ivey <kcivey@cpcug.org>

These posters accounted for 24.8% of all articles.

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

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

 161.6 ( 62.8/ 87.9/ 54.3)     79  Tad McClellan <tadmc@metronet.com>
 118.3 ( 68.5/ 49.8/ 25.2)     79  Drew Simonis <care227@attglobal.net>
 100.3 ( 47.1/ 50.9/ 24.1)     56  jason <elephant@squirrelgroup.com>
  96.7 ( 61.8/ 34.3/ 21.1)     72  Bart Lateur <bart.lateur@skynet.be>
  76.4 ( 34.0/ 31.6/ 30.8)     39  The WebDragon <nospam@nospam.com>
  70.1 ( 40.5/ 29.6/ 20.1)     44  p3rlc0dr@my-deja.com
  63.5 ( 26.8/ 29.0/ 25.6)     36  abigail@delanet.com
  61.3 ( 27.3/ 24.8/ 10.3)     31  Uri Guttman <uri@sysarch.com>
  60.1 ( 35.1/ 19.2/ 11.6)     31  Keith Calvert Ivey <kcivey@cpcug.org>
  57.4 ( 29.8/ 27.5/ 17.2)     25  nnickee@nnickee.com

These posters accounted for 24.7% of the total volume.

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

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

1.000  (  1.3 /  1.3)      5  "David Fleet" <dfleet@avaterra.com>
0.974  ( 30.8 / 31.6)     39  The WebDragon <nospam@nospam.com>
0.934  (  3.1 /  3.3)      7  deno <jdNOjdSPAM@syncon.ie.invalid>
0.923  (  8.8 /  9.5)      6  joerg@sql.de
0.915  (  2.0 /  2.2)      5  kj0 <kj0@mailcity.com>
0.883  ( 25.6 / 29.0)     36  abigail@delanet.com
0.863  (  3.6 /  4.1)      6  Jeff H <jeffahill@lucent.com>
0.823  (  5.3 /  6.5)      6  jason iversen <jasoniversen@my-deja.com>
0.799  (  4.6 /  5.8)      6  Mads Orbesen Troest <mads@troest.NEVERMORE.dk>
0.780  (  4.7 /  6.1)      8  Alan Page <alandpage@aol.comnospam>

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

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

0.389  (  3.1 /  8.0)      9  "mike solomon" <mike.solomon@eps.ltd.uk>
0.385  (  1.5 /  4.0)      8  Russ Jones <russ_jones@rac.ray.com>
0.355  (  1.5 /  4.2)      9  Tom Briles <sariq@texas.net>
0.346  (  2.0 /  5.8)     11  Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
0.326  (  0.9 /  2.6)      6  bmetcalf@nortelnetworks.com
0.324  (  0.6 /  1.9)      6  =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
0.323  (  1.5 /  4.6)      5  "Rodney Rindels" <rrindels@arkansas.net>
0.316  (  2.6 /  8.3)      5  Bill Webster <billw@dal.asp.ti.com>
0.314  (  1.3 /  4.2)      7  "Peter Sundstrom" <peter.sundstrom@eds.com>
0.245  (  1.8 /  7.4)     11  "taboo" <taboo@doofa.net>

89 posters (15%) had at least five posts.

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

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

  165  ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
   39  String length?
   23  Upper-to-lower case problem
   22  New to perl, need help
   20  Perl Expert? I need help!
   20  Beyond perl? Need advice...
   19  Method to obfuscate or disguise Perl source code?
   19  PRINTing " "" "
   19  stupid perl question
   18  multidimensional associative arrays

These threads accounted for 17.8% of all articles.

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

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

 291.6 (161.8/118.5/ 72.9)    165  ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
  74.5 ( 34.9/ 35.3/ 19.3)     39  String length?
  43.6 ( 19.1/ 21.0/ 12.9)     22  New to perl, need help
  41.7 ( 15.4/ 25.1/ 14.2)     17  Bizarre BEGIN block problem
  39.3 ( 16.7/ 21.7/ 12.2)     20  Beyond perl? Need advice...
  36.4 ( 18.1/ 17.5/  8.5)     20  Perl Expert? I need help!
  35.1 ( 17.4/ 16.9/ 10.0)     23  Upper-to-lower case problem
  34.5 ( 15.2/ 18.8/ 10.2)     16  running system command as root from perl
  34.5 ( 16.6/ 15.4/  8.3)     19  Method to obfuscate or disguise Perl source code?
  33.0 ( 16.3/ 14.1/  8.0)     19  PRINTing " "" "

These threads accounted for 18.9% of the total volume.

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

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

0.912  (  1.9/   2.1)      7  Perl and Mysql
0.834  (  2.2/   2.7)      5  off-topic, "Compiler" technology
0.828  (  9.7/  11.7)      9  Redirect External Program's output on Windows ?
0.828  (  1.9/   2.3)      5  Difference between a .cgi file and a .pl file?
0.798  (  4.8/   6.1)      7  programming tools and techniques
0.782  (  1.9/   2.5)      7  Getting a random var as output
0.778  (  1.7/   2.2)      5  PERL IDES
0.778  (  5.0/   6.4)      9  split NONSENSE
0.746  (  5.6/   7.5)      8  Need Help with array (should be easy!)
0.738  (  3.4/   4.5)      6  Read a file into a hash ?

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

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

0.462  (  1.2 /  2.7)      5  command line input 
0.460  (  2.1 /  4.5)      5  Printing web pages
0.460  (  2.5 /  5.4)      7  Why $|++ instead of $|=1 ?
0.447  (  5.2 / 11.7)     14  -w and Use of uninitialized value at
0.440  (  2.2 /  5.0)      8  Newbies cry for help
0.431  (  1.4 /  3.2)      5  using @_ with subs (Just a quickie from a Perl Wannabe :)
0.419  (  2.3 /  5.4)      8  Anyone have a Free Meta Crawler Script
0.370  (  3.5 /  9.5)     13  file endings with regexps...
0.362  (  4.2 / 11.5)      8  need post/lwp example
0.331  (  1.0 /  2.9)      5  How can I print date on an include file

116 threads (22%) had at least five posts.

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

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

      52  alt.perl
      36  comp.lang.perl
      29  comp.lang.perl.modules
      10  comp.lang.javascript
       8  alt.html
       7  alt.perl.sockets
       6  alt.html.editors.toppage
       5  comp.programming
       5  comp.os.linux.misc
       5  comp.sys.sun.apps

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

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

      12  Greg Treece <gtreece@vhbtech.com>
       8  abigail@delanet.com
       8  kmhanser@my-deja.com
       8  ynotssor@my-deja.com
       7  brian d foy <brian@smithrenaud.com>
       6  Tom <chaptera@hotmail.com>
       6  "Ed Foy" <ed@nospam.com>
       5  Michael Carman <mjcarman@home.com>
       5  "nicolas" <webmaster@archiTacTic.com>
       4  Steffen Beyer <sb@muccpu1.muc.sdm.de>


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

Date: Mon, 17 Jul 2000 06:20:54 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: The problem of two Submit buttons
Message-Id: <MPG.13dca80f433d16e98abd3@nntp.hpl.hp.com>

In article <3972f71c.18645050@news.grnet.gr>, 
pjlees@ics.forthcomingevents.gr says...

 ...

> Out of interest, is 
> 
> if ( !( $a eq $b ) ) 
> 
> equivalent to 
> 
> if ( $a ne $b ) )?

Yes.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 17 Jul 2000 13:33:11 GMT
From: miko@idocs.com
Subject: Warnings in taint check
Message-Id: <8kv1um$mj8$1@nnrp1.deja.com>

I'm getting some warnings when I check for taintedness.  I haven't seen
anyone else mention this issue and I'm wondering if I'm doing someting
wrong, and/or if my workaround is acceptable.

Basically, when I use the standard taint checking subroutine, I get two
warnings every time:

  Useless use of join in void context at test.pl line 26.
  Useless use of join in void context at test.pl line 26.

Here's the entire script that generates the warning:

  #!/usr/bin/perl -wT
  use strict;
  use CGI;

  my ($query, $testvar);
  $query = CGI->new;
  $testvar = $query->param('testvar');

  # CGI header
  print $query->header();

  # display tainted info
  print "\$testvar is ";
  if (is_tainted($testvar))
     {print "tainted<P>"}
  else
     {print "not tainted<P>"}

  # perl version
  print "Perl version: $]\n";

  sub is_tainted
  {
  return ! eval
     {
     join('',@_), kill 0;
     1;
     };
  }

This happens in Perl version: 5.00404.

Now, the error actually makes sense. The join IS happening in a void
context and it's Perl's duty to report such mischief. So my kludge is
to remove the void context by assigning the results to a variable like
this:

  sub is_tainted
  {
  my ($junk);
  return ! eval
     {
     $junk=join('',@_), kill 0;
     1;
     };
  }

It seems like a good solution to me, but, in the words Bart Mancuso in
The Hunt for Red October, "I'd better phone this one in". What's the
feeling here on this solution?

-miko


--
Miko O'Sullivan
Author of The Mikodocs Guide to HTML
http://www.mikodocs.com/tags/


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 17 Jul 2000 09:54:22 -0400
From: kj0 <kj0@mailcity.com>
Subject: WHERE is libnet?????
Message-Id: <8kv36e$2vn$1@panix3.panix.com>




I've been searching CPAN for 1 hour trying and failing to find libnet.
Can anybody tell me where it is and/or why searching CPAN for it
fails?

Thanks,

kj



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

Date: Mon, 17 Jul 2000 16:18:02 +0200
From: Thomas Rassmann <Thomas.Rassmann@sdm.de>
Subject: Re: WHERE is libnet?????
Message-Id: <3973159A.5211E981@sdm.de>

kj0 schrieb:
> 
> I've been searching CPAN for 1 hour trying and failing to find libnet.
> Can anybody tell me where it is and/or why searching CPAN for it
> fails?
> 
> Thanks,
> 
> kj

Search for 'libnet' in http://www.cpan.org/modules/01modules.index.html.
(it's a 'Net'-Module...: Net GBARR libnet-1.0703.tar.gz  63k  23 Mar
2000)

Tom
--
Thomas Rassmann			mailto:Thomas.Rassmann@sdm.de
sd&m AG				http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, D-81737 Muenchen, Germany
Tel +49 89 63812-346  Fax -410


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

Date: Mon, 17 Jul 2000 14:19:01 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: WHERE is libnet?????
Message-Id: <pBEc5.256$Px6.23416@news.dircon.co.uk>

On 17 Jul 2000 09:54:22 -0400, kj0 Wrote:
> 
> I've been searching CPAN for 1 hour trying and failing to find libnet.
> Can anybody tell me where it is and/or why searching CPAN for it
> fails?

I dont know why it fails for you but it works for me :


   <http://search.cpan.org/search?mode=module&query=libnet>


/J\


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 3692
**************************************


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