[7153] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 778 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 25 10:18:14 1997

Date: Fri, 25 Jul 97 07:00:38 -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           Fri, 25 Jul 1997     Volume: 8 Number: 778

Today's topics:
     Calling an interactive FORTRAN program <nm@jb.man.ac.uk>
     Re: cgi for form based uploads (David Efflandt)
     Re: CGI href (David Efflandt)
     Re: DB_FILE versus dbmopen <icava@gva.es>
     Re: how to reverse substitution order ? (M.J.T. Guy)
     Re: how to reverse substitution order ? (Mick Farmer)
     Re: Idea for a New Perl Book <tchrist@mox.perl.com>
     Re: LWP (Mick Farmer)
     Re: member of an array (Honza Pazdziora)
     Re: Newbie Post! Heads up! (file question) (Burt Lewis)
     Re: Newbie seeks help for random calls (Mick Farmer)
     Re: Newbie seeks help for random calls <flavell@mail.cern.ch>
     Re: Performance benefits for homogeneous structures? (M.J.T. Guy)
     Re: Please help with WWWboard, I know nothing of perl! (David Efflandt)
     Re: problem with simultaneous calls to same script <rootbeer@teleport.com>
     sending URLs <cferry@cs.strath.ac.uk>
     Re: String Literals (Mick Farmer)
     Syslog -- help please (Anthony J. Breeds-Taurima)
     Re: Too many people in this group are arrogant #*(@# (R <jbokma@caiw.nl>
     Re: Too many people in this group are arrogant #*(@# (R Steve_Kilbane@cegelecproj.co.uk
     Re: Too many people in this group are arrogant #*(@# (R (Clay Irving)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 25 Jul 1997 11:51:48 +0100
From: Nuria McKay <nm@jb.man.ac.uk>
Subject: Calling an interactive FORTRAN program
Message-Id: <Pine.SOL.3.91.970725114657.2478F-100000@landau>

Hi,

I'm in the process of writing a perl script in which I need to run a FORTRAN 
program to do some number crunching.
Unfortunately, the FORTRAN program (which I cannot change) was written to be 
run interactively, and hence requires input from STDIN, rather than from the 
command line, which is proving to be a problem when trying to run it from 
perl.

I have succeeded in running the program via the following (not very 
satisfactory) method:

  system <<'EndOfShellScript';
  name_of_fortran_program <<EOF
  datafile.dat
  /scratch/Directory1/
  23
  EOF
  EndOfShellScript

My problem now, however, lies in that the input passed to 
"name_of_fortran_program" above is stored in variables provided at run-time by
another part of the perl script.

So, I would like to write something like

  $data = 'datafile.dat';
  $dir  = '/scratch/Directory1/';
  $num  = 23;

  system <<'EndOfShellScript';
  name_of_fortran_program <<EOF
  $data
  $dir
  $num
  EOF
  EndOfShellScript

which, of course, is not correct.

Can anyone suggest how to pass variables to an external program via a system 
call, or alternatively, a better way to call the FORTRAN program in the first 
place ?

Any assistance would be greatly appreciated.
Cheers,

Nuria.
-------------------------------
Nuria McKay  (nm@jb.man.ac.uk)


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

Date: Fri, 25 Jul 1997 12:46:11 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: cgi for form based uploads
Message-Id: <33dd7649.7408974@198.147.221.35>

"Don Botten" <donb@dllb.com> wrote:

>I have the patch for Explorer 3.02 for browser form based file uploads and
>it looks good.  I need help on the perl cgi program to receive the upload. 
>Does anyone have an example of the perl (cgi) script to accept and locate
>the file on the server?
>-- 
>*********************************************
>      Don Botten        donb@dllb.com
>               http://www.dllb.com
>*********************************************

I have 'uldemo' at http://www.xnet.com/~efflandt/pub/

It doesn't have any security measures to determine who is uploading
what, but it can give you a basis to work from.  A simple security
measure would be to give the script an obscure name and not have any
links to it.

Either the file you write to must already exist with write permission
for others OR the directory would have to have write permission for
'others' if you want to upload new files.


David Efflandt/Elgin, IL USA
efflandt@xnet.com    http://www.xnet.com/~efflandt/


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

Date: Fri, 25 Jul 1997 12:46:19 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: CGI href
Message-Id: <33de7c7c.8995434@198.147.221.35>

Tim McGilvreay <allroy@wpi.edu> wrote:

>Hi,
>	I am totally new to CGI and Perl so I was wondering if any of you
>out there might be able to help me out.  The basic problem is that I am
>trying to get a text link to refer to a CGI (this is not the problem), but
>only a specific subroutine of the CGI.
>
>for example:
>
><a href="something.cgi but only a specific subroutine">Link</a>
>
>The answer is probably something simple, but experience is something I
>lack.  If anyone can help out... thanks in advance.
>
>Also...
>
>Say I wanted one of the tasks of this particular subroutine to be opening
>a document in an HTML frame.  For example:
>I click on the "LINK" in some type of menu frame, and it changes the
>document in the main frame.  I know this is simple in HTML, but have no
>clue in Perl.  Any ideas...
>
>please email
>allroy@wpi.edu

You can use the query string to pass a word without spaces or
variables.  Example:

<A HREF="some.cgi?page2">Next Page</A>

in the script:

$whichpage = $ENV{QUERY_STRING};

See my manual slide show example 'frezfram.pl'.


David Efflandt/Elgin, IL USA
efflandt@xnet.com    http://www.xnet.com/~efflandt/


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

Date: 25 Jul 1997 10:46:22 GMT
From: "Inmaculada Cava" <icava@gva.es>
Subject: Re: DB_FILE versus dbmopen
Message-Id: <01bc98df$c4a04ce0$2f6890c1@pc75.cap.gva.es>



Chris Nandor <pudge@pobox.com> escribis en artmculo
<pudge-ya02408000R2307970819420001@news.idt.net>...
> In article <33D2D78C.A22D817B@wco.com>, Kenneth Kin Lum <kinlum@wco.com>
wrote:
> 
> # DB_FILE uses Berkeley's DB, and creates one file per database (table).
> # dbmopen, etc, uses two files per database (table).
> # 
> # Is one more efficient than the other in speed?  Or is DB_FILE just a 
> # concatenation of those two files per database?
> 
> There are many different types of DBM packages.  dbmopen() uses the most
> common one, which has some limitations.  DB_File has very few
limitations,
> is significantly faster, etc.  The only problem is getting Berkeley DB
> installed.  Can be harsh (for me anyway).
> 
> Regardless, yes, DB_File is basically the same thing, but done a
different
> way in the background.  The interface you will use to tie to the database
> is virtually the same as the other DB module (NDBM_File, SDBM_File, &c.).
> 
> --
> Chris Nandor             pudge@pobox.com             http://pudge.net/
> %PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
>

I'm using the program wwwstat (an script in perl) to obtein statistics of
my Web server and I have problems with the function dbmopen ( ).

When I run the program (wwwstat) it says that:

$ wwwstat -F ws.rc -dns -cache 'dnscache' > prueba.html
Can't locate AnyDBM_File.pm in @INC at wwwstat line 1343 

So, I tried to locate this file and I found it in:

/opt/gnu/lib/perl5

among these other files:

AnyDBM_File.pm  NDBM_File.pm    ODBM_File.pm    SDBM_File.pm

Then I saw this line in wwwstat.pl:

unshift(@INC, '.', ($ENV{'HOME'} || $ENV{'LOGDIR'}));

and I said to myself: why don't add this path so as to find ANYDB... :

unshift(@INC, '.', ($ENV{'HOME'} || $ENV{'LOGDIR'}),'/opt/gnu/lib/perl5');

but now this is the result:

$ wwwstat -F ws.rc -dns -cache 'dnscache' > prueba.html
Global symbol "ISA" requires explicit package name at
/opt/gnu/lib/perl5/SDBM_F.
Global symbol "VERSION" requires explicit package name at
/opt/gnu/lib/perl5/SD.
Global symbol "ISA" requires explicit package name at
/opt/gnu/lib/perl5/ODBM_F.
Global symbol "VERSION" requires explicit package name at
/opt/gnu/lib/perl5/OD.
AnyDBM_File.pm did not return a true value at wwwstat line 1343.

line 1343: 
       dbmopen(%DNScache, $DNScachefile, 0666) ||
            die "Cannot open DBM files $DNScachefile: $!\n";

I suspect that the problem is related to the location of the library.

Could anyone help me please?

Thanks in advance.


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

Date: 25 Jul 1997 12:44:12 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: how to reverse substitution order ?
Message-Id: <5ra72s$ram@lyra.csx.cam.ac.uk>

In article <EDuv4y.1p7@nonexistent.com>, Abigail <abigail@fnx.com> wrote:
>
>Uhm, I've yet to encounter a program that doesn't resolve foo/bar/.. 
>to foo/, even if foo/bar is a symlink to /something/else.
>Even doing cd foo/bar; stuff; cd ..; brings me to foo, while
>doing stuff in /something/else.
>
>Or am I just lucky?

Sounds like you're very unlucky and have a severely broken Unix.   Here's
what that example does for me (SunOS 4.1.3 and /bin/sh):

$ mkdir somewhere
$ mkdir somewhere/else
$ touch somewhere/else/thing
$ mkdir foo
$ ln -s ../somewhere/else foo/bar
$ cd foo/bar; ls; cd ..
thing
$ pwd
/home/mjtg/somewhere               <<<<<<< doesn't look like foo to me
$


Mike Guy


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

Date: Fri, 25 Jul 1997 12:28:07 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: how to reverse substitution order ?
Message-Id: <EDvJyv.411@mail2.ccs.bbk.ac.uk>

Dear Proux,

Your dot substitution is ok.  Your dot-dot substitution
needs to iterate.  This works for me.

	1 while s![^/]+/\.\./!!;

Regards,

Mick


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

Date: 25 Jul 1997 13:25:12 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Idea for a New Perl Book
Message-Id: <5ra9fo$krg$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    aml@world.std.com (Andrew M. Langmead) writes:
:The first edition of "Programming Perl" had a chapter 'Common Tasks in
:Perl'. It gave one-liners and short snippets of code to perform
:various tasks.
:
:It was removed from the second edition, reportedly due to time and size
:constraints.
:
:There was some talk about O'Reilly coming out with a book that covered
:material similar to the "Common Tasks" stuff, but I haven't heard
:anything lately. the person who said he was working on it doesn't
:hang around here any more.

    Title: "The Perl Cookbook" [tentative]
    Author: Tom Christiansen and Nathan Torkington.
    Publisher: O'Reilly
    ETA: 4Q97

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


I just hate to be pushed around by some fucking machine. - Ken Thompson, on the i960


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

Date: Fri, 25 Jul 1997 12:44:39 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: LWP
Message-Id: <EDvKqF.4oJ@mail2.ccs.bbk.ac.uk>

Dear Zaheed,

This will print your <h1> headings.

$/ = '</h1>';
while (<>) {
	last unless m!</h1>!s;
	s/.*(<h1>.*)/$1/s;
	print "$_\n";
}

Regards,

Mick


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

Date: Fri, 25 Jul 1997 09:58:18 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: member of an array
Message-Id: <adelton.869824698@aisa.fi.muni.cz>

Bitt Faulk <bitt@mci.net> writes:

> I'm sure this is a really stupid question one way or another, but....
> 
> I seem to remember an operator that functions like this:
> 
> $a memberof (1,2,3,4,5)
> 
> where memberof is the operator that I can't remember and returns
> a boolean as to whether or not $a is either 1, 2, 3, 4, or 5.

if (grep {$a == $_} @list) {

but it will go through the whole list, even if one match is already
found.

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
    European RC5 56 bit cracking effort -> http://www.cyberian.org/


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

Date: 25 Jul 1997 10:10:12 GMT
From: burt@ici.net (Burt Lewis)
Subject: Re: Newbie Post! Heads up! (file question)
Message-Id: <5r9u24$l2e$1@bashir.ici.net>

Jamie,

This is how I handle opening my files.  You do need the specific path:

$data = "/files/WWW/vhtdocs/boondoggle/area3/data.txt";
open(FILE,"$data");

Hope this helps.

Burt

In article <Pine.BSF.3.95.970725015145.2541A-100000@atlas.comet.net>, 
jamie@comet.net says...
>
> Ok, pardon the shroud of ignorance here and/or if this is a Frequently
>Questioned Answer.....
>when I (or you or we) say:
>
>open(SOMEFILE,">disfile") || die "no can do"
>open(TINCAN,"tincan") || die "tincan won't open"
>
> are the files (disfile and tincan) always assumed by perl to be in the
>directory that the script is in? I'd think the answer is yes, unless
>specified otherwise (as in /etc/passwd, /etc/aliases or by some variable).
> Is there ever a case when it's otherwise? Or am I fulla worms here? I'm
>fairly new to perl, so again pardon my SOI.
> Emailed answer would be much appreciated, as our news server expires like
>every 14 minutes or something...
> thanks in advance,
>
>jamie                                                       jamie@comet.net
>***************************************************************************
>            For PGP public key, mail me with Subject:GET KEY
>        For random Ambrose Bierce quote, Mail me with Subject: ambrose 
>       Support the anti-Spam amendment - Join at http://www.cauce.org/
>      "Microsoft was invented by domestic terrorists.  Remember, it's
>                     no longer an import industry."
>
>



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

Date: Fri, 25 Jul 1997 11:58:56 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: Newbie seeks help for random calls
Message-Id: <EDvIM9.2v2@mail2.ccs.bbk.ac.uk>

Dear Lefty,

If you want a random element from an array, then this
should work.

	$value = $array[rand @array];

Regards,

Mick


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

Date: Fri, 25 Jul 1997 12:39:30 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Newbie seeks help for random calls
Message-Id: <Pine.A41.3.95a.970725143622.66952D-100000@sp049>

On Fri, 25 Jul 1997, Mick Farmer wrote:

> If you want a random element from an array, then this
> should work.
> 
> 	$value = $array[rand @array];

I remember one of our students being entirely baffled that 
every time he ran his program that involved "rand", it produced
the same answer.  This isn't random at all, said he. 

So we told him about srand.  Since this thread is avowedly about
newbies, I thought one might mention that.



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

Date: 25 Jul 1997 10:41:20 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Performance benefits for homogeneous structures?
Message-Id: <5r9vsg$lnf@lyra.csx.cam.ac.uk>

Russ Allbery  <rra@stanford.edu> wrote:
>dave <over@the.net> writes:
>> With perl I can create a hash of hashes.  Is there performance benefits
>> gained by making each hash within the hash have the same keys (different
>> values for each key)?
>
>Not that I know of, nor can I think of any particular reason why there
>should be.

Things have changed since Perl 5.003.   Gurusamy Sarathy's "shared keys"
patch included in Perl5.004 gives considerable improvements in space and
time in many common cases.    Consider these two test scripts:

# first script  -  all keys the same
my @hashes;
system 'ps', "-l$$";
for ($i=0;$i<100000;$i++) {
push @hashes, { "this is a fairly long key", 1 };
};
system 'ps', "-l$$";

# first script  -  all keys different
my @hashes;
system 'ps', "-l$$";
for (my $i=0;$i<100000;$i++) {
push @hashes, { "this is a fairly long key$i", 1 };
};
system 'ps', "-l$$";

The 'ps' output shows the following:

Perl version    Script       Space      Time

   5.003         same       25656k      36 secs
   5.003       different    25656k      48 secs
   5.004_01      same       18592k      18 secs
   5.004_01    different    27096k      44 secs

So on this (admittedly extreme) example, there are large gains in both
space and time.   This is because only one copy is stored of each string
which is used as a hash key, however many times it is used in a Perl
program.


Mike Guy


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

Date: Fri, 25 Jul 1997 12:46:03 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Please help with WWWboard, I know nothing of perl!
Message-Id: <33dc75bb.7266201@198.147.221.35>

"Audio Video Pros" <avpros@avpros.net> wrote:

>I have been trying to install WWWboard and I keep getting a 500 error,
>Internal server error. I know nothing about this but I beleive it has to do
>with my base directory. I do not know how to find out the path for it, no
>reply from my webmaster. If I go to the contents of the program, that is
>the main page for WWWboard and not enter a name I get the no name entered
>page so I guess some processing is happening. But if I fill the form out
>and try to post the info I get the error. HELP! 
>
>Check out the contents at http://www2.thecia.net
>/users/avpros/wwwboard/wwwboard.html
>
>Dave
>dave@avpros.net

Make sure the file you are trying to write to has 666 permissions (see
'man chmod').  My SSI-FAQ has an sh script that can show the current
directory and path for a CGI script.  This was helpful when our web
path differred from our shell path (now they are the same).


David Efflandt/Elgin, IL USA
efflandt@xnet.com    http://www.xnet.com/~efflandt/


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

Date: Fri, 25 Jul 1997 06:50:26 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Andrew Whitehead <awhitehead@netmart.co.uk>
Subject: Re: problem with simultaneous calls to same script
Message-Id: <Pine.GSO.3.96.970725064940.9406E-100000@kelly.teleport.com>

On 25 Jul 1997, Andrew Whitehead wrote:

> Is there anything I can do to ensure that if one instance of the CGI
> script is running, the other calls to it have to wait until it has
> finished before they can use it. 

I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps! 

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

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 25 Jul 1997 11:48:23 +0100
From: Clare Ferry <cferry@cs.strath.ac.uk>
Subject: sending URLs
Message-Id: <33D88477.4551@cs.strath.ac.uk>

hi
i was wondering if anyone has examples of a perl script that can receive 
or send urls???
thanks
cferry@cs.strath.ac.uk


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

Date: Fri, 25 Jul 1997 12:16:37 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: String Literals
Message-Id: <EDvJFp.3JG@mail2.ccs.bbk.ac.uk>

Dear Fan,

Double quoted strings have variables and escapes
interpolated, as in the following.

	$var = 'abc';
	print "xxx$var";	# prints xxxabc
	print 'xxx$var';	# prints xxx$var

	print "\n";		# prints newline
	print '\n';		# prints \n

Regards,

Mick


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

Date: 25 Jul 1997 09:14:08 GMT
From: tony@poseidon.canningcollege.wa.edu.au (Anthony J. Breeds-Taurima)
Subject: Syslog -- help please
Message-Id: <869864963.495830@proteus.cantech.net.au>
Keywords: Syslog

Hello to all,
	I'm very new to news so I appologies if I have asked a FAQ.

I'm trying to get syslog working under perl:

System:
CPU:  166Mhz 
RAM:  96Mb
Perl: 5.004_01
OS:   Linux 2.0.30

I have run the following code, there are no errors but there is also no
output in the syslog file.

I would normally run "perl -d syslog_test.pl" but something about the "use"
statement causes a seg. falut.

I have run h2ph sys/syslog.h 

Is there anything obvisly wrong with my code/setup where do I go from here ??

Yours Tony.

Source:

#!/usr/bin/perl

use Sys::Syslog;

openlog('TEST', 'cons,pid', 'user');
syslog('info', 'this is a test');
closelog();


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

Date: 25 Jul 1997 09:50:29 GMT
From: "John Bokma" <jbokma@caiw.nl>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <01bc98e0$4753c5e0$c30ab2c2@Tschai>



Andrew M. Langmead <aml@world.std.com> wrote in article
<EDuInp.6GL@world.std.com>...
> "John Bokma" <jbokma@caiw.nl> writes:
> 
> >Subject: Re: Too many people in this group are arrogant #*(@# (Re:
> > Checking for valid Email...)
> 
> Let me just suggest another way of looking at this issue.
> 
> A FAQ document is supposed to contain concise, factual, entries
taking
> care of questions about its subject. If I had a question, I would
much
> rather someone point out an entry in the FAQ instead of having
someone
> post an answer.

Some questions are that simple, that the answer and a pointer to the
FAQ can
be at one line. 

[ snip ]

> Being able to give an authoritative answer like "the FAQ says..."
> stops an awful lot of wrong answers from being posted. 

Some postings use the FAQ like some holy bible, and don't leave any
room
for thinking together about a solution. The FAQ *can* be wrong, or
maybe
incomplete (I don't say it is!).

> Yes, a lot of
> questions from the FAQ and man pages are being asked nowadays. Its
a
> shame the posters didn't do a fair amount of their own work first.
I'd
> rather read one post that says "the FAQ says ..." than a half dozen
> wrong answers.

Wrong answers can lead to different or even better solutions. The
process
is sometimes called brain storming... I don't think it is needed on
really simple
questions like: how do I remove leading/trailing spaces.

> >Too many people (even some famous ones, yes you know that I mean
> >you!) reply
> >on too many posting with "Read the FAQ", DejaNews. 
> 
> The way I think about things, I would much rather have someone
point
> out to me a specific, verifiable reference, over someone giving an
> answer of the top of their head.

I never answer Perl questions out of the top of my head (unless it is
a really simple one..). If my answer is a script I try it before
posting it.
If my answer is not a script, I search the Programming Perl (new
and/or
old one) and think about the reply in the book, before posting (the
book can
be wrong 8-), and I want to know what I post...)
 
> As an example. The other day, I was asking a mechanical engineer
how
> much space there was between the paper sensor and the rubber roller
on
> a part he designed. I didn't need an exact measurement, just a
rough
> idea how much further i needed to eject the paper after the sensor
to
> make sure the paper was grabbed by the pinch roller. He could have
> eyeballed it and gave me a guess, but instead he reminded me about
the
> disk of mechanical drawings he sent.

But he probably didn't answer you "See the DISC".

> Two lessons. First, an exact reference is much better than an
imformed
> opinion.

How about both?

> Second, when someone asks a question, and is told that they
> have already been provided with the answer, they should be
> embarrassed, not upset.

Some newbies don't know about things like a FAQ or where to find the
answer.
Too many people are forgotten that they started as newbies too! Only
now, there
are much more newbies!

> 
> >Or what I really hate, when someone asks "How can I do this
without
> >using the
> >... lib/module?" that the answers is: "Why not? It worked for me.
> >Instead of
> >answering the original question.
> 
> The only case I can think of where I have seen someone ask "how can
I
> do this without using {fill in library, module or base language
> feature here.} is in relation to perl 4. I'm not saying that
everyone
> should be forced to upgrade to the latest version of every piece of
> software, but think about it. Perl 5 was written to correct many
> problem inherent in perl 4. If perl 4 lacks the ability to do
> something conveniently, it was very likely corrected in perl 5.
> 
> Most of the rest of the answers that say "use the xxx module
available
> at <URL:http://www.perl.com/CPAN/>" are responses to questions
where
> people just said "how do I do xxx". Its not that they needed a
> non-module solution, they were just lucky enough to get one.
> 
> If someone as a certain reason for not using a particular libarary,
> module or language feature, they can say so. Most people here
probably
> do enough tinkering so that evan a "I just know how a xxx would
work"
> is a good enough reason.
> 
> Hey, tell you what. Find me a post where someone asks "How can I do
> this without using the ... lib/module?"

Use DejaNews, (Sockets). I can remember a few postings about Sockets,
answered
with the "holy" answer:  "And thou should only use the LPW module!"

> 
> >If that's the only thing you want to share
> >with this group, please don't. There is enough noise already.
Stupid
> >questions don't
> >need stupid answers, just don't answer them 
> 
> Then you have the group of people who then post "no one answers my
> questions here." flames.

And if you don't reply these too, they stop 8-). 

> 
> You can't win either way.

I think that you win much more by being nice, instead of arrogant.
I.e. post
both a reply and a pointer, not only the mantra "See the FAQ".

Please be sure the reply by !Ook too. He is much better in expressing
this than I am
(But hey, English is not my native language 8-).

> -- 
> Andrew Langmead
> 

John 


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

Need a Freelance Software Developer (MSc)? (CGI, Perl, Java, C, C++)

http://www.caiw.nl/~jbokma [Java demo's, Curriculum Vitae and
more...]

email: jbokma@caiw.nl  phone: +31 10 4291827



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

Date: Fri, 25 Jul 1997 14:00:33 GMT
From: Steve_Kilbane@cegelecproj.co.uk
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <7197cd$e021.393@news.cegelecproj.co.uk>

This is coming up more and more often; perhaps next time we can
just direct people to the FAQ...

Really, it's issues of pride, common courtesy and value for money.
Speaking personally, I don't post a question unless I'm damn sure
I can't figure out the answer or get it from another source (FAQs,
similar posts, web searches, manuals, etc.) Far, *far* too many
people don't seem to have that sort of patience. Ok, so some problems
are urgent. Most aren't.

Secondly, USENET and the Internet both have rules, and one of
the unwritten ones is that you're not supposed to just dump your
work on other people. Other groups often have posts which bubble
down to "please do my class assignment for me." The Perl groups
general don't, but a lot of posts lean that way. Even if you don't
have the urge to locate a solution yourself, you're still supposed to
look for FAQs, etc. It doesn't take that long to figure out that's
how USENET hangs together, and ISPs should be drilling this into
users to begin with, but that's another gripe.

Finally, anyone who posts answers can only do so so many times
in a day, and the more answers that are posted, the lower quality
those answers are going to be. To me, it stands to reason that you'd
want to give answers that are "worth" giving; if you have to answer
the same question again and again and again, you're going to think
that people aren't listening, and it isn't worth you putting the time
in. That's where FAQs came from, after all.

Someone gave an example about a mechanical engineer who gave
a possibly better answer than was expected. Fair enough. If the
poster was the first in a line of fifty people who asked the *exact
same question*, the guy would get a little short-tempered. If
there were another fifty asking the same next week, he'd be
getting wound up, and would soon be saying, "Those specs are
on the web site; look 'em up yourself, and lemme do some work."

As for why the quick answer shouldn't be "read the FAQ, which
contains '....'", the answer is that this is expecting the respondant
to do the work, not the original poster, which is downright selfish.
USENET is not free consultancy or a magic oracle. It also provides
no incentive for the original poster to actually look up the FAQ, so
why should they bother next time?

So, this comes down to either the "arrogant" posters should do as
they currently do ("read the FAQ"), or just not answer at all (which
may save them time at that point, but may not stop other FAQs
being asked by the same people). I guess this is personal preference.

Final point: other than Perl Institude posts, when was the last time
anyone saw a post from Larry here?
-- 
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.



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

Date: 25 Jul 1997 09:26:18 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <5ra9hq$s0a@panix.com>

In <01bc98e0$4753c5e0$c30ab2c2@Tschai> "John Bokma" <jbokma@caiw.nl> writes:

>> Being able to give an authoritative answer like "the FAQ says..."
>> stops an awful lot of wrong answers from being posted. 

>Some postings use the FAQ like some holy bible, and don't leave any
>room for thinking together about a solution. The FAQ *can* be wrong, or
>maybe incomplete (I don't say it is!).

You're back-pedalling -- Reading the FAQ and not understanding something 
or thinking something is wrong/incomplete is very different from not
bothering to read the FAQ.

>> Yes, a lot of questions from the FAQ and man pages are being asked 
>> nowadays. Its a shame the posters didn't do a fair amount of their own 
>> work first. I'd rather read one post that says "the FAQ says ..." than 
>> a half dozen wrong answers.

>Wrong answers can lead to different or even better solutions. 

Wrong answers more commonly lead to lots of confusion and bad code.

>The process is sometimes called brain storming... I don't think it is 
>needed on really simple questions like: how do I remove leading/trailing 
>spaces.

But you seem to advocat brain-storming an issue like testing valid Email
addresses that has been discussed to death over the last few months.
Why? Because its a more complex issue and rehashing all prior discussion
is suddenly going to make it simple? I don't think so...

>I never answer Perl questions out of the top of my head (unless it is
>a really simple one..). If my answer is a script I try it before
>posting it. If my answer is not a script, I search the Programming Perl (new
>and/or old one) and think about the reply in the book, before posting (the
>book can be wrong 8-), and I want to know what I post...)

Ah! You do a little work before you post something -- You try the script,
you do a little research... You must be one of the "Good Guys". :)

Lot's of folks these days don't bother to write a program, read the FAQ,
search the subject in DejaNews, or poke through the modules list to see if 
there's something that can help them. 

>> He could have eyeballed it and gave me a guess, but instead he reminded 
>> me about the disk of mechanical drawings he sent.

>But he probably didn't answer you "See the DISC".

The FAQ is mentioned over and over and over again -- remember, that's why
your bitching. :) 

If the mechanical engineer had to remind you about "the DISC" 74 times
each day, you'd probably hear "RTF DISC!" after a very short period of
time.

>Some newbies don't know about things like a FAQ or where to find the
>answer. Too many people are forgotten that they started as newbies too! Only
>now, there are much more newbies!

If the newbies don't know where to find the answer to a "Frequently Asked
Question" they are referred to the FAQ. That's the purpose of the FAQ.

When I search DejaNews for "Perl FAQ" I have to read three articles before
I found the URL for the Perl FAQ. It took about 15 seconds. It takes even
less time and energy if you do the same search on AltaVista or Yahoo.

If you would like to volunteer to look up the "Frequently Asked Question"
and post it to the newsgroup (like alot of others commonly do), feel free,
but some of us don't have the time to provide this service for every newbie
who doesn't know what an FAQ is.

>I think that you win much more by being nice, instead of arrogant.
>I.e. post both a reply and a pointer, not only the mantra "See the FAQ".

You're right. See the *Perl* FAQ. :)

-- 
Clay Irving <clay@panix.com>                   http://www.panix.com/~clay/


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 778
*************************************

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