[13474] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 884 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 23 06:07:17 1999

Date: Thu, 23 Sep 1999 03:05:09 -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: <938081109-v9-i884@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 23 Sep 1999     Volume: 9 Number: 884

Today's topics:
    Re: ./  -- why? <nospam.newton@gmx.net>
    Re: Ad hominem (was Re: perl related question now!) (Anno Siegel)
    Re: Ad hominem (was Re: perl related question now!) (Anno Siegel)
    Re: answers <nospam.newton@gmx.net>
    Re: Be careful about using constants (Bart Lateur)
    Re: Be careful about using constants <michael@shoebox.net>
        confusing localtime  <zhuang@ic.sunysb.edu>
    Re: confusing localtime <jkline@one.net>
        DBD::Pg problem <codex@bearclaw.bogus.net>
        Grouping in REs, no doc found <rhomberg@ife.ee.ethz.ch>
    Re: How to create files from CGI script? <r3564c@email.mot.com>
    Re: How to validate a URL? <couton@bigfoot.com>
        Newbie question: modules <andrew@linksnetwork.com>
    Re: Newbie- foreach $var (keys %fields) - Outputs in wr (Chris)
    Re: Newbie- foreach $var (keys %fields) - Outputs in wr (Chris)
    Re: REQ: tell-a-friend script (Bart Lateur)
        Send doubles over a network dieter.heiliger@gmx.de
    Re: String Splitting andy_muscat@my-deja.com
    Re: unsafe pipe opens (was:Some e-mails get sent, some  (I.J. Garlick)
    Re: You should be admired (Henry Penninkilampi)
    Re: You should be admired <jkline@one.net>
    Re: You should be admired <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 23 Sep 1999 10:03:38 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: ./  -- why?
Message-Id: <37E9DEDA.2EAD0C0D@gmx.net>

Michael Budash wrote:
> 
> Apparently '.' isn't in your PATH on your RedHat server... of course,
> it can be added in any number of places thusly:
> 
> PATH=.:$PATH
> export PATH

1) How does this code add . to your PATH "in any number of places"?

2) This opens yourself up to things such as your favourite co-worker
putting a shell script containing "rm -rf *" and called "ls" into your
directory. '.' shouldn't be the first component of your path, and
probably shouldn't be in it at all.

Cheers,
Philip


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

Date: 23 Sep 1999 09:28:28 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <7scrrs$vcj$1@lublin.zrz.tu-berlin.de>

Elaine -HFB- Ashton  <elaine@chaos.wustl.edu> wrote in comp.lang.perl.misc:
>Anno Siegel wrote:
>> 
>> Hemogoblin?
>
>:) COfFEe Ring. Hemoglobin, while it does have Fe, is far more complex

Yes.  Hemogoblin, however...

Anno


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

Date: 23 Sep 1999 09:30:43 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <7scs03$vdb$1@lublin.zrz.tu-berlin.de>

Ala Qumsieh  <qumsieh@sympatico.ca> wrote in comp.lang.perl.misc:

>"The arguments against Perl given by Python users are ad hominem."

That'd be "ad linguam".

Anno


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

Date: Thu, 23 Sep 1999 09:58:07 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: answers
Message-Id: <37E9DD8F.51D5C025@gmx.net>

Ala Qumsieh wrote:
> 
> Does this make me a PoB in the meantime?

Larry Rosler in <MPG.1251cce4af6e9474989fb9@nntp.hpl.hp.com>:

> PoB-ness is a state of mind, not of tools.

Cheers,
Philip


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

Date: Thu, 23 Sep 1999 08:34:31 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Be careful about using constants
Message-Id: <37eccb8f.2883013@news.skynet.be>

Ilya Zakharevich wrote:

>>  A) constants should look like read-only variables, so that string
>> interpolation works with them
>
>You take one objective and pretend there are no others.

Just a matter of being consequent. Why do $1 and friends look like
variables, and not like functions? It sure is handy sometimes: string
interpolation, and the ambiguity problems that started this thread, and
wouldn't exist in this case, are two examples.

>>  B) the value lookup overhead should happen at compile time; not a
>> function call every time you need the value.
>
>This is already so for non-autoloaded functions.
 ...

Wow.

I thought the constant module created a function closure at compile
time, and needed a function call every time the value is asked for?

BTW Thanks for the info.

-- 
	Bart.


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

Date: 23 Sep 1999 01:23:49 -0800
From: Michael Fowler <michael@shoebox.net>
Subject: Re: Be careful about using constants
Message-Id: <87puzaouai.fsf@beowulf.one.eth>

bart.lateur@skynet.be (Bart Lateur) writes:

> Wow.
> 
> I thought the constant module created a function closure at compile
> time, and needed a function call every time the value is asked for?
> 
> BTW Thanks for the info.

As the TECHNICAL NOTE states in perldoc constant, constants are
currently implemented as possibly inlineable subroutines.  They are
defined with an empty prototype.  Because autoloading is done at
run-time, any constant lookups do incur the overhead of a subroutine
call.


Michael
--
There isn't a mome rath alive that can outgrabe me.
--


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

Date: Thu, 23 Sep 1999 00:48:16 -0400
From: "Z. Huang" <zhuang@ic.sunysb.edu>
Subject: confusing localtime 
Message-Id: <37E9B10F.4ED58766@ic.sunysb.edu>

    Today is 9/23/99. But localtime shows 8/23/1999. I tested it on two
unix machines with the same result. Anyone one knows why?



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

Date: Thu, 23 Sep 1999 03:15:29 -0400
From: Joe Kline <jkline@one.net>
To: "Z. Huang" <zhuang@ic.sunysb.edu>
Subject: Re: confusing localtime
Message-Id: <37E9D391.45F09238@one.net>

[posted and mailed]

"Z. Huang" wrote:
> 
>     Today is 9/23/99. But localtime shows 8/23/1999. I tested it on two
> unix machines with the same result. Anyone one knows why?

Take a good long look at the documentation that comes with every
installation of perl:

perldoc -f localtime

perldoc perlfunc

It will reveal what is happening. You'll also want to pay particular
attention to the year, so as to avoid the Y19100 problem.

joe


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 23 Sep 1999 08:44:07 GMT
From: Codex <codex@bearclaw.bogus.net>
Subject: DBD::Pg problem
Message-Id: <rLlG3.668$OH6.11517@news1.online.no>

I, ahem, have come across a problem. I've followed the perldoc for DBD::Pg
(as far as I can tell), but I'm still having trouble.

The code I am trying to get to work is as follows:

$dbname="foo";
$dbuser="nobody";
$dbpasswd="";
DBI->trace(2,"/tmp/dbi.trace.out");
$dbh = DBI -> connect("dbi:Pg:dbname=$dbname",$dbuser,$dbpasswd);
if($DBI::errstr) {
   print STDERR $DBI::errstr;
   exit(1);
}
$table="film";
$statement = $dbh->prepare("SELECT DISTINCT genre FROM $table");
$rv = $dbh->do($statement);

The error I get is:

DBD::Pg::db do failed: ERROR:  parser: parse error at or near "dbi"

I can't for  the life of me see what I've done wrong here.

The trace output is as follows.

cat /tmp/dbi.trace.out 
DBI 1.13-nothread dispatch trace level set to 2
Note: perl is running without the recommended perl -w option
 -> DBI->connect(dbi:Pg:dbname=foo, nobody, )
 -> DBI->install_driver(Pg) for perl=5.00503 pid=849 ruid=99 euid=99
install_driver: DBD::Pg loaded (version 0.92)
<- install_driver= DBI::dr=HASH(0x81a28e8)
-> connect for DBD::Pg::dr (DBI::dr=HASH(0x81a28e8)~0x81dd3ec 'dbname=foo' 'nobody' '' HASH(0x80c6fdc))
dbd_db_login
dbd_db_login: conn_str = >dbname=foo user=nobody<
<- connect= DBI::db=HASH(0x81dd374) at DBI.pm line 382.
-> STORE for DBD::Pg::db (DBI::db=HASH(0x81dd3e0)~INNER 'PrintError' 1)
dbd_db_STORE
<- STORE= 1 at DBI.pm line 407.
-> STORE for DBD::Pg::db (DBI::db=HASH(0x81dd3e0)~INNER 'AutoCommit' 1)
dbd_db_STORE
dbd_db_STORE: initialize AutoCommit to on
<- STORE= 1 at DBI.pm line 407.
<- connect= DBI::db=HASH(0x81dd374)
-> $DBI::errstr (&) FETCH from lasth=DBI::db=HASH(0x81dd3e0)
>> DBD::Pg::db::errstr
-> prepare for DBD::Pg::db (DBI::db=HASH(0x81dd374)~0x81dd3e0 'SELECT DISTINCT genre FROM film')
dbd_st_prepare: statement = >SELECT DISTINCT genre FROM film<
dbd_st_preparse: statement = >SELECT DISTINCT genre FROM film<
<- prepare= DBI::st=HASH(0x81dd4c4) at showcat line 59.
-> do in DBD::_::db for DBD::Pg::db (DBI::db=HASH(0x81dd374)~0x81dd3e0 DBI::st=HASH(0x81dd4c4))
2   -> prepare for DBD::Pg::db (DBI::db=HASH(0x81dd3e0)~INNER DBI::st=HASH(0x81dd4c4) undef)
dbd_st_prepare: statement = >DBI::st=HASH(0x81dd4c4)<
dbd_st_preparse: statement = >DBI::st=HASH(0x81dd4c4)<
2   <- prepare= DBI::st=HASH(0x8201118) at DBI.pm line 900.
-> execute for DBD::Pg::st (DBI::st=HASH(0x8201118)~0x80d2120)
dbd_st_execute
dbd_st_execute: statement = >DBI::st=HASH(0x81dd4c4)<
ERROR:  parser: parse error at or near "dbi"
error 7 recorded: ERROR:  parser: parse error at or near "dbi"
!! ERROR: 7 'ERROR:  parser: parse error at or near "dbi"
'
<- execute= undef at DBI.pm line 901.
!! ERROR: 7 'ERROR:  parser: parse error at or near "dbi"
'
<- do= undef at showcat line 60.
-> DESTROY for DBD::Pg::st (DBI::st=HASH(0x80d2120)~INNER)
dbd_st_destroy
<- DESTROY= undef at showcat line 69.
-> disconnect for DBD::Pg::db (DBI::db=HASH(0x81dd374)~0x81dd3e0)
dbd_db_disconnect
<- disconnect= 1 at showcat line 74.
-> DBI::END
-> disconnect_all for DBD::Pg::dr (DBI::dr=HASH(0x81a28e8)~0x81dd3ec)
dbd_discon_all
<- disconnect_all= '' at DBI.pm line 424.
<- DBI::END complete
-> DESTROY for DBD::Pg::st (DBI::st=HASH(0x8200fc8)~INNER)
dbd_st_destroy
<- DESTROY= undef during global destruction.
-> DESTROY for DBD::Pg::db (DBI::db=HASH(0x81dd3e0)~INNER)
dbd_db_destroy
<- DESTROY= undef during global destruction.
-> DESTROY in DBD::_::common for DBD::Pg::dr (DBI::dr=HASH(0x81dd3ec)~INNER)
<- DESTROY= undef during global destruction.



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

Date: Thu, 23 Sep 1999 11:19:32 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Grouping in REs, no doc found
Message-Id: <37E9F0A4.5D747E9C@ife.ee.ethz.ch>

Hi

I tried the following code:
$_ = "49f8325";
my @x = m/^((\d)+)/;
expecting @x to become (49, 4, 9). Well it became (49,9). To get this,
I'd rather have written /(\d*(\d))/.

While this is ok, I did not find anything about it in qw/perlre perlvar
perlop perlfaq6/. Actually there is almost nothing about grouping in
there.
I didn't find the info that nested groups map to $<digit> in the order
that parentheses open.
I didn't find info about what happens when a group is followed by a
quantifier *?+{}

The following questions came up:
- Is there some information about this?
- If there isn't, what can I do to update one of the manpages mentioned
above?
- What can I do to get the desired result? (Meaning every \d as an
element in @x)

-Alex


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

Date: Thu, 23 Sep 1999 11:49:48 +0200
From: Dermot McNally <r3564c@email.mot.com>
Subject: Re: How to create files from CGI script?
Message-Id: <37E9F7BC.551A3887@email.mot.com>



"I.J. Garlick" wrote:

> Mind you putting data files in the dir immediately below(above) cgi-bin on
> most systems is even worse. It's generally the base URL directory of the
> site, and everything tends to be accessible there.

Not on any WWW server I've ever set up. Apache's default configuration,
in any case, is such that the cgi-bin directory is a sibling, not a
child directory of htdocs. Which is a good thing...

Dermot


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

Date: Wed, 22 Sep 1999 11:45:49 +0100
From: "Paul Carter" <couton@bigfoot.com>
Subject: Re: How to validate a URL?
Message-Id: <n0mG3.463$GG5.13525@news2-hme0>

What I am doing is writing some scripts to act like bravenet.com
But, I want to make sure that they enter a valid e-mail address and a valid
URL for their site.

So, for the e-mail address.. it's pretty much valid if it doesn't contain
 .@.
 ..
 ,
 )
 &
 ?
 >
 " "  (space)

Tom Phoenix <rootbeer@redcat.com> wrote in message
news:Pine.GSO.4.10.9909151045290.25903-100000@user2.teleport.com...
> On Wed, 15 Sep 1999, Mark wrote:
>
> > > My friends Fred and Barney would like you to write to them at this
> > > (valid) address:
> > >
> > >     <"fred and barney"(.@..@,,)@redcat.com>
> >
> > Bad and all as the check is, it does look for double @'s so this
> > address would fail.
>
> That's my point; the address is valid.
>
> > Note, if the addr matches the above RE, it is
> > invalid, not 'tother way round.
>
> One of us is missing something. If an address matches the pattern in the
> original message, it may or may not be an invalid address. No?
>
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/
>




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

Date: Thu, 23 Sep 1999 10:18:11 +0100
From: "LinksNetwork Admin" <andrew@linksnetwork.com>
Subject: Newbie question: modules
Message-Id: <7scrd7$er4$1@nclient13-gui.server.virgin.net>

Hi All,

I have been searchiong high and low for a good tutorial on modules.
Basically I want to be able to retrieve a URL through my program (for link
validation), and according to the FAQ, the module LWP is the best way to do
this.   I downloaded it from CPAN in the hope that it was a simple case of
putting the module in the same directory as the script, but the zip file I
downloaded contained a whole directory structure, hundreds of files, more
than one LWP.pm, and I have no idea how to even start.

HELP!

My server runs Apache on Lynux.

Andrew Betts




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

Date: Thu, 23 Sep 1999 08:31:47 GMT
From: cnlsilva@gte.net (Chris)
Subject: Re: Newbie- foreach $var (keys %fields) - Outputs in wrong order ?????
Message-Id: <37a53e61.9827392@news.gte.net>

On Tue, 30 Nov 1999 00:00:20 +1030, root <khan@arcom.com.au> wrote:
You really do need to read - I suggest the Programming Perl and Perl
Cookbook.  Just to get you on the right track hashes do not preserve
their insert order.  There is a module 

Tie::IxHash

that will preserve that order and give you some other bennies.
get more info on page 139 of Perl Cookbook 20% off at Barnes and Noble

-good luck ;)
>Martin Quensel wrote:
>> 
>> >working OK except the output from "foreach $var (keys %fields)" is not
>> >in the order the data was added to the array.
>> 
>> what? maybee you should check what a "hash" is and how it works, before
>> using them in your script
>
>Maybe, I am about to go look up "hash" before I seem really stupid, the
>books I am following tell me I am using an associative array and being
>familiar (a little) with C I understand an array but I will go look 
>
>> 
>> >The data seems to be stored in correct order but "foreach $var (keys
>> >%fields)" outputs in wrong order?
>> >
>> It prints them out just right.
>> 
>> If you want some order, you should try "sort", (perlfunc page....has a good
>> code snippet on how to sort a hash)
>
>Yes, it does print them OK, it even writes them to the data.txt file OK,
>but I do not want to sort them, I want them to appear in the same order
>as the form that submitted them. Specifically the Domain_Name field
>should be the first field output not the fourth. This is what I do not
>understand.
>
>I have played with sort but that is not what I want to do.
>
>The domain_Name field is the first field stored but is the fourth field
>output?
>
>Anyway, thanks for the suggestion I will go look up this hash
>
>Thanks Kevin Hancock



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

Date: Thu, 23 Sep 1999 08:31:49 GMT
From: cnlsilva@gte.net (Chris)
Subject: Re: Newbie- foreach $var (keys %fields) - Outputs in wrong order ?????
Message-Id: <37a73ec7.9929637@news.gte.net>

On Tue, 30 Nov 1999 00:00:20 +1030, root <khan@arcom.com.au> wrote:
You really do need to read - I suggest the Programming Perl and Perl
Cookbook.  Just to get you on the right track hashes do not preserve
their insert order.  There is a module 

Tie::IxHash

that will preserve that order and give you some other bennies.
get more info on page 139 of Perl Cookbook 20% off at Barnes and Noble

-good luck ;)

On Tue, 30 Nov 1999 00:00:20 +1030, root <khan@arcom.com.au> wrote:

>Martin Quensel wrote:
>> 
>> >working OK except the output from "foreach $var (keys %fields)" is not
>> >in the order the data was added to the array.
>> 
>> what? maybee you should check what a "hash" is and how it works, before
>> using them in your script
>
>Maybe, I am about to go look up "hash" before I seem really stupid, the
>books I am following tell me I am using an associative array and being
>familiar (a little) with C I understand an array but I will go look 
>
>> 
>> >The data seems to be stored in correct order but "foreach $var (keys
>> >%fields)" outputs in wrong order?
>> >
>> It prints them out just right.
>> 
>> If you want some order, you should try "sort", (perlfunc page....has a good
>> code snippet on how to sort a hash)
>
>Yes, it does print them OK, it even writes them to the data.txt file OK,
>but I do not want to sort them, I want them to appear in the same order
>as the form that submitted them. Specifically the Domain_Name field
>should be the first field output not the fourth. This is what I do not
>understand.
>
>I have played with sort but that is not what I want to do.
>
>The domain_Name field is the first field stored but is the fourth field
>output?
>
>Anyway, thanks for the suggestion I will go look up this hash
>
>Thanks Kevin Hancock



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

Date: Thu, 23 Sep 1999 08:34:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: REQ: tell-a-friend script
Message-Id: <37e9c7c1.1908973@news.skynet.be>

Tom Christiansen wrote:

>1) You don't want people ever trying to write "else if".  No
>   dangly elses.  Ruins the grammar.  This is a really important
>   technical matter.

There is NO dangling else problem in Perl. "else", as it stands now,
MUST be followed by a block = braces. A bare "else" followed by any bare
word is now illegal syntax. So what would have been ambiguus about "else
if"? "else BLOCK" => else, "else if" => elsif. A bit of lookahead is all
that is needed.

Not that I care that much. I do mistype sometimes ("elseif", not "else
if").

-- 
	Bart.


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

Date: Thu, 23 Sep 1999 08:25:11 GMT
From: dieter.heiliger@gmx.de
Subject: Send doubles over a network
Message-Id: <7sco4v$oqh$1@nnrp1.deja.com>

Hi!

I want to receive data sent by a Windows NT C++ program via a perl
script. Everything works fine except for floating point numbers. The C++
program converts the data to network byte order before sending it using
a socket.

What I do is the following: I receive data from the socket and unpack
the whole thing into variables. The data structure sent by the C++
program includes strings, longs and doubles. Strings and longs work
fine, but not doubles. When I print the variable that I got from the
unpack the figure displayed has nothing to do with the figure that I
sent from the C++ program.

Any ideas?
Any help is highly appreciated!

Thanks in advance.

Bye
Dieter


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 23 Sep 1999 09:12:25 GMT
From: andy_muscat@my-deja.com
Subject: Re: String Splitting
Message-Id: <7scqtk$qdg$1@nnrp1.deja.com>

In article <7s8n2l$dnc$1@murdoch.acc.Virginia.EDU>,
  mdz4c@node14.unix.Virginia.EDU (Matthew David Zimmerman) wrote:
> In article <7s85hk$dm1$1@nnrp1.deja.com>,  <andy_muscat@my-deja.com>
wrote:
> >
> >get the line into a variable like
> >$line = "Sep 21 14:53:19 s108 sendmail[18811]: OAA18811:
> >from=<user@etoncollege.org.uk>, size=1895, class=0, pri=31895,
nrcpts=1,
>
>msgid=<A76C57705916D211B3400020480E101789C8D9@nts5.school.etoncollege.o
r
> >g.uk>, proto=ESMTP, relay=nts5.school.etoncollege.org.uk
> >[195.195.166.146]";
>
> What's wrong with this statement? (Hint: What kind of quoting
characters
> do you use around the string?)
>

The statement above implies is meant to show that the contents of the
variable line would be the quoted string.

To get this into the variable you would obviously do

$line = <FILE>;

where FILE is a handle to the opened /var/log/maillog file.

> ># then get user and size
> >$line =~/from=<([^>]+)>,\s*size=(\d+),/;
> >$user = $1;
> >$size = $2;
>
> What happens if $line doesn't contain a match for both? What if the
> 'size='
> field is before the 'user=' field?
>
> Good effort, but always remember your error checking.

This is a log file therefore a certain amount of consistency was
assumed.

Of course

if($line =~/from=<([^>]+)>,\s*size=(\d+),/) {
  $user = $1;
  $size = $2;
} else {
  print "Dodgy log file line:\n$line\n";
}

Would be more robust.

I think assuming the order taht another process writes things to its log
file will be consistant is not that naive.

Ah well back to writing C++.

>
> #####
> #!/usr/bin/perl5 -lw
> #
> use strict;
>
> my $string='Sep 21 14:53:19 s108 sendmail[18811]: OAA18811:
> from=<user@etoncollege.org.uk>, size=1895, class=0, pri=31895,
nrcpts=1,
>
msgid=<A76C57705916D211B3400020480E101789C8D9@nts5.school.etoncollege.or
> g.uk>, proto=ESMTP, relay=nts5.school.etoncollege.org.uk
> [195.195.166.146]';
>
> print "From:$1" while $string =~ m/from=(.*?),/gs;
> print "Size:$1" while $string =~ m/size=(.*?),/gs;
> #####
>

So you do't open the file, you hard code the line to be processed and
you assume that the output is to be printed to the log.

Good effort :-)

Andy

> HTH! Matt
> --
> Matthew Zimmerman ------------  http://www.people.virginia.edu/~mdz4c
> Interdisciplinary Biophysics Program --------- University of Virginia
> | "You got to be very careful if you don't know where you're going, |
> | because you might not get there."                   -- Yogi Berra |
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 23 Sep 1999 08:10:18 GMT
From: ijg@connect.org.uk (I.J. Garlick)
To: moseley@best.com (Bill Moseley)
Subject: Re: unsafe pipe opens (was:Some e-mails get sent, some don't)
Message-Id: <FII6p6.AMv@csc.liv.ac.uk>

[courtesy cc mailed to cited author]

In article <MPG.1252724fd3aa52a2989765@nntp1.ba.best.com>,
moseley@best.com (Bill Moseley) writes:
> Sorry, I didn't see what other people pointed out about $adr =~ s/'/ /g; 

[snip]

> 
>    $query =~ tr/'/ /; 
>    open(PROG, "$prog -s ' $query ' -d $database|") or die $!;

if your going get them to do that I would at least consider this as it's
not that much different and everything I have ever read about shells
indicates it's much safer, (well sh and ksh anyway).

	$query =~ s/(\W)/\\$1/g;
	open(PROG, "$prog -s $query -d $database|") or die $!;

Theoretically all punctuation will now make it to $prog unaltered in $2
(or equivalent command line variable nomenclature)

also I am not 100% certain of this but have been testing it for the last
month (every time I think up a new slant on what to try in fact) and it
hasn't bitten me yet, but then thems famous last words :-)

-- 
Ian J. Garlick
ijg@csc.liv.ac.uk

It's a damn poor mind that can only think of one way to spell a word.
                -- Andrew Jackson



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

Date: Thu, 23 Sep 1999 16:40:53 +0930
From: spamfree@metropolis.net.au (Henry Penninkilampi)
Subject: Re: You should be admired
Message-Id: <spamfree-2309991640540001@d6.metropolis.net.au>

In article <37E93E45.8EA1E2FE@mail.cor.epa.gov>, David Cassell
<cassell@mail.cor.epa.gov> wrote:

> > People, settle!
> 
> I am settling.  Mostly around my waistline.

:^)


> I'm happy to let others deal with non-Perl questions, particularly
> if they also explain in their reply that the question would get
> a better answer in newsgroup X or Y.  I am not willing to let
> absurd attitudes about this newsgroup stand uncontested, since
> that can only contribute to more off-topic questions at a later
> date. ["Why not?  J Random Luser said last week that it was okay
> and no one disagreed..."]  And then, when the arguments go
> _ad_hominem_ ...

Agreed.

This newsgroup raises the bar unusually high (as far as expectations on
newbies are concerned) - higher than any other newsgroup I know of.  It
gives the group an interesting feel - elitist, almost snobbish. 
Personally, I like the vibe, but I sometimes wonder if it scares off
potential new recruits.

Has anyone ever considered CFDing [comp.lang.perl.worthy] and (veteran
Perl users) moving serious discussions to that group?  That would give
carte blanche to Abigail (et al) to shred those that stray off the yellow
brick road.  It would also lighten the tone in *this* newsgroup, which
would make it more appealing to newbies.

That's assuming we actually want to encourage more people to get into
Perl, of course, which may not be the desire of many folks here.

Henry.


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

Date: Thu, 23 Sep 1999 03:23:44 -0400
From: Joe Kline <jkline@one.net>
Subject: Re: You should be admired
Message-Id: <37E9D580.49F92293@one.net>

Henry Penninkilampi wrote:
> 
> This newsgroup raises the bar unusually high (as far as expectations on
> newbies are concerned) - higher than any other newsgroup I know of.  It
> gives the group an interesting feel - elitist, almost snobbish.
> Personally, I like the vibe, but I sometimes wonder if it scares off
> potential new recruits.

I've always liked the vibe as well. It can get kind of rough from time
to time, but Kragen S. has really been fielding a lot of the load the
last few days. It's seemed to help the mood.

> Has anyone ever considered CFDing [comp.lang.perl.worthy] and (veteran
> Perl users) moving serious discussions to that group?  That would give

It's more commonly know as comp.lang.perl.moderated, a place where
wizards tread.

> That's assuming we actually want to encourage more people to get into
> Perl, of course, which may not be the desire of many folks here.

<off_topic>

Having been a pathological lurker since about 1992/1993 (mostly in
rec.crafts.brewing to start and c.l.p.m starting in 1996).

I always like to assess a situation before I act. I think it was about
3 months of lurking in c.l.p.m. before I posted a question. It gave me
a feel for the regulars' expectations and "traditions". Of course, I'm
the cautious type, most of the time...
</off_topic>

joe


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 23 Sep 1999 10:51:44 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: You should be admired
Message-Id: <37e9f830_1@newsread3.dircon.co.uk>

Henry Penninkilampi <spamfree@metropolis.net.au> wrote:
> 
> This newsgroup raises the bar unusually high (as far as expectations on
> newbies are concerned) - higher than any other newsgroup I know of.  It
> gives the group an interesting feel - elitist, almost snobbish. 
> Personally, I like the vibe, but I sometimes wonder if it scares off
> potential new recruits.
> 

Perhaps other groups dont have the same constant parade of 'Web Developers'[1],
Script Kiddies, Warez d00dz, spammers, cheating students and sundry other
ignorant losers and feckless scum that this group seems to attract.  It 
appears that the majority of these people see the 'misc' in the name of
this group and think that it gives them license to replace the 'perl' with
whatever they happen to be thinking of at the time.  I'm sure you would
agree that if this group is to be a useful forum for  the genuine Perl
question then we shouldnt just humor these people, for instance, by
giving them answers in an unrelated language to a question that was not
related to Perl in the first place.  Further I am sure you will agree that
in humoring these people the situation will only be made worse.

> Has anyone ever considered CFDing [comp.lang.perl.worthy] and (veteran
> Perl users) moving serious discussions to that group?  That would give
> carte blanche to Abigail (et al) to shred those that stray off the yellow
> brick road.  It would also lighten the tone in *this* newsgroup, which
> would make it more appealing to newbies.
> 

How many times does this need to be said and how many times do answers
be given, before it sinks in.  We are not talking about newbies here we
are not talking about people straying we are talking about people who
come here and expect every single question that they might have about
any problem domain that Perl might be ever so tenuously connected to to
be answered.  What we are talking about is that when these people are
told they have asked the questions in the wrong place, however abrubtly
or politely, we always get some barrack room social worker who starts
jumping up and down and saying that perhaps we ought to have some old
folks home for the people who actually have made some nett contribution
to this group so that the newbies and the sundry losers referred to
above can have comp.lang.perl.misc as their personal playroom.  Fine.
Why not raise a CFD if you think that you want to turn this group into a
smoking pit by changing its charter to explicitly allow the things that
people get upset about ?

Its always interesting that all the people who suggest we should balkanize
comp.lang.perl.misc because they dont like people being nasty to losers
never suggest that they will post a CFD themselves - it is always couched
as "Has anyone ever considered CFDing ..." or its moral equivalent.

> That's assuming we actually want to encourage more people to get into
> Perl, of course, which may not be the desire of many folks here.
> 

This has nothing to do with encouraging 'people to get into Perl', this is
about encouraging people to use Usenet properly.  This groups primary
purpose is for the discussion of Perl programming,  we dont need to
get involved in advocacy here as it is assumed that people are here because
they are using Perl.  This group is not here to discuss HTML, Javascript,
Server configuration, where to get spamming or cracking  tools, Warez and
free CGI scripts.

I would refer you to the post with the subject line :

     How to find the right place to post (FAQ)

in the group news.announce.newusers

For those (who seem to be in ascendence right now) who dont have access to
this newsgroup because their news-server is improperly configured this
is at:

 http://www.deja.com/getdoc.xp?AN=498432950&fmt=text

[1] By 'Web Developer' I am referring not to the genuine programmers whose
    work involves some stuff for the web,  I am referring to the type of
    the designer who believes that Perl can be done without having any
    programming skills - "I am not a programmer but I would like to have a
    guestbook on my site" .... 

/J\
-- 
"I sign my paintings Vincent because people can't pronounce Van Gough"
- Vincent Van Gough


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

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


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