[12915] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 325 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 1 14:07:16 1999

Date: Sun, 1 Aug 1999 11:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 1 Aug 1999     Volume: 9 Number: 325

Today's topics:
    Re: [Q] ($x +++ 1) ??? <jeffp@crusoe.net>
        [Q] Aliasing Perl one-liners in the tcsh <kj0@mailcity.com>
    Re: ActivePerl Build 815 Setup Problem (NEED HELP) <chrisnet01@yahoo.com>
    Re: Announcement: "CRAP" <uri@sysarch.com>
        Change relative links to absolute mark@bstar.net
        compare two flat data files ? <factory@factory.co.kr>
    Re: Confusion with the Schwartzian Transform used in so <twade@nobmispam.net>
    Re: Confusion with the Schwartzian Transform used in so (Larry Rosler)
    Re: Confusion with the Schwartzian Transform used in so (Anno Siegel)
    Re: defconfaq - Q&A on arguments against the hypothetic <uri@sysarch.com>
    Re: defconfaq - Q&A on arguments against the hypothetic (Reini Urban)
    Re: defconfaq - Q&A on arguments against the hypothetic <tchrist@mox.perl.com>
    Re: Does anyone know how to create a CGI program for Mu <llornkcor@llornkcor.com>
    Re: flock me! (Michael James OConnor)
        Flock (Michael James OConnor)
    Re: Help opening a file (Anno Siegel)
    Re: How to get a sample module working (simple). (Tad McClellan)
    Re: LINUX APACHE PERL <llornkcor@llornkcor.com>
    Re: Looking for Perl4 for Unix (Tad McClellan)
        perl 2 c converter/compiler/translater ? (markus)
    Re: perl IP to OS mapping help <ffr200@my-deja.com>
    Re: pipes vs csv (Tad McClellan)
    Re: reg expression (Anno Siegel)
    Re: why are you so harsh to this guy ? (Tad McClellan)
    Re: Why won't this little script work? (Anno Siegel)
    Re: Why won't this little script work? <aperrin@mcmahon.qal.berkeley.edu>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sun, 1 Aug 1999 11:36:18 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: [Q] ($x +++ 1) ???
Message-Id: <Pine.GSO.4.10.9908011135040.22485-100000@crusoe.crusoe.net>

On Jul 31, Jeff Pinyan blah blah blah:
> The space after the variable $a is viewed as a filehandle, due to the
> circumstances that:
>   print $a +++ $b;
> is
>   print SOMEFILEHANDLE + ++$b;
> is
>   print SOMEFILEHANDLE ++$b;

Correction:

The space after the variable $a makes $a viewed as a filehandle.  (It
sounds like the space was the filehandle, not true.)

-- 
jeff pinyan    japhy@pobox.com
japhy's little hole in the (fire) wall:   http://www.pobox.com/~japhy
perl stuff     japhy+perl@pobox.com
japhy's perl supposit^Wrepository:        http://www.pobox.com/~japhy/perl
CPAN ID: PINYAN            http://www.perl.com/CPAN/authors/id/P/PI/PINYAN



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

Date: 1 Aug 1999 16:20:05 GMT
From: kj0 <kj0@mailcity.com>
Subject: [Q] Aliasing Perl one-liners in the tcsh
Message-Id: <7o1s3l$hjq$1@news.panix.com>




I find it either inordinately difficult, or more often, downright
impossible, to alias Perl one-liners under tcsh.  Everything I try
produces one error or another:

    Illegal variable name.
    _: Undefined variable.
    Variable name must contain alphanumeric characters.
    Unmatched ".
    ...

ad nauseam.  Perl's greater variety of quoting mechanisms sometimes
saves the day, but not always.  For example, I haven't been able to
alias TPJ's one-liner #38, by Abigail:

    perl -0011 -pi -e '/\011/&&($_="$'")' filename

I tried all sorts of desperate versions, like:

    alias untab "perl -0011 -pi -e '/\011/&&(\$\_=qq,\$\',) \!^"

but all would result in errors like the ones above.  Any suggestions
on how to get such an alias to work?  (I'm not primarily interested in
this one particular alias, but the general problem of defining such
Perl one-liners as tcsh aliases; I'm also aware of the ultimate
solution of chucking tcsh altogether in favor of, say, bash.)

Thanks,

KJ






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

Date: Sun, 1 Aug 1999 18:18:23 +0100
From: "Chris" <chrisnet01@yahoo.com>
Subject: Re: ActivePerl Build 815 Setup Problem (NEED HELP)
Message-Id: <7o1vha$sun$1@dvorak.ednet.co.uk>

Running WIn 98, you don't have the PWS server running by any chance, do you?

If it is, stop it running for the duration of the install process.

Hope you get it sorted.

--
Chris





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

Date: 01 Aug 1999 12:07:22 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Announcement: "CRAP"
Message-Id: <x7emhnmqmd.fsf@home.sysarch.com>

>>>>> "JP" == Jeff Pinyan <jeffp@crusoe.net> writes:

  JP> Johnathan, if you have some URLs of festering hellholes of broken
  JP> -- yet proliferated -- Perl programs, please send me them.  I've
  JP> got a team of 13 people here waiting to write articles about them.

just go to any search engine and find other cgi hellholes. i found a
bunch when i did a search for a cgi survey script a while ago but i
didn't keep any of the url's since they all were sucky code. every one
seemed descended from the 'eve' of matt and had crappy cgi parsing,
backwhacked quotes, no here docs, etc. i couldn't bear to touch any of
them. it was like they had perl ebola.

also many of the hellholes seem to link to each other. i think that is
how they pass infectious and deadly perl dna around.

your crew has its hands full. i think you would need a research lab like
in the andromeda strain to keep any code from infecting you or any of
your existing scripts. maybe you should drink sterno while reading the
code! :-)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Sun, 01 Aug 1999 16:03:47 GMT
From: mark@bstar.net
Subject: Change relative links to absolute
Message-Id: <7o1r4v$1is$1@nnrp1.deja.com>

I've got a variable that holds one whole HTML page in it.
I'd like to convert all the relative links in it to absolute links (but
not mess with the already absolute links)
I can specify the 'home' directory ie
$homedir = "http://www.mydomain.com/thisiswhereitshouldbelooking/";

Someone -must- have this code somewhere so I don't have to spend the
time redoing it! :)
Do you?
Thanks


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


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

Date: Mon, 2 Aug 1999 01:28:14 +0900
From: "Yeong Mo/Director Hana co." <factory@factory.co.kr>
Subject: compare two flat data files ?
Message-Id: <7o1s11$stm$1@news1.kornet.net>

I want to compare two flat data files for just second array at each line.

If there is a line which has a word "hellow" at second array in "a.txt",
and there is no line which has "hellow" at second array in "b.txt",
how can I get the value of "hellow" ?

"hellow" is an example. It could be something else.




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

Date: Sun, 1 Aug 1999 09:00:10 -0700
From: "meteorman" <twade@nobmispam.net>
Subject: Re: Confusion with the Schwartzian Transform used in sorting
Message-Id: <rq8rocbh2nccq6@corp.supernews.com>

Larry,

I appreciate your comments; however, you are incorrect about thinking it
does not compile because it does.  I am running the script on Windows 95.
Therefore, just because it doesn't appear it want compile, don't assume it
doesn't and hasn't been ran.  I tried working with it this code for several
hours and each time it ran but not with the correct results.

 ...Wade...




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

Date: Sun, 1 Aug 1999 09:47:12 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Confusion with the Schwartzian Transform used in sorting
Message-Id: <MPG.120e19e153aebc9989d89@nntp.hpl.hp.com>

In article <rq8rocbh2nccq6@corp.supernews.com> on Sun, 1 Aug 1999 
09:00:10 -0700, meteorman <twade@nobmispam.net> says...
> I appreciate your comments; however, you are incorrect about thinking it
> does not compile because it does.  I am running the script on Windows 95.

That is relevant only in regard to the semantic validity of filenames, 
nothing else.

> Therefore, just because it doesn't appear it want compile, don't assume it
> doesn't and hasn't been ran.  I tried working with it this code for several
> hours and each time it ran but not with the correct results.

You are right in this regard:  I misread the 'print $_;' in the middle 
of the (semantically erroneous) Schwartzian Transform as syntactic 
nonsense.

> @by_spotname =
>   map { $_->[1] }
>   print $_;
>   sort { $a->[0] cmp $b->[0] }
>   map { [$_, (split /,/)[0]] }
>   <LIST>;

Instead, it is semantic nonsense, as the '-w' flag would have told you:

  Useless use of sort in void context at ... [line N]
  Use of uninitialized value at ... [line N-1]

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


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

Date: 1 Aug 1999 17:02:02 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Confusion with the Schwartzian Transform used in sorting
Message-Id: <7o1uia$6a2$1@lublin.zrz.tu-berlin.de>

meteorman <twade@nobmispam.net> wrote in comp.lang.perl.misc:
>I am confused on how to code the above Transform properly.

Yes, you are.  See below.

>                                                            Once sorted, how
>do I programmatically replace the original file with the newly sorted data?
>Any help would be greatly appreciated.

Well, if you like a risk, just re-open your file for writing and
print it out.  Otherwise, rename the original, read from that and
then open the original filename for writing and print it.  You can
just print the sorted array, as in 

print LIST @by_spotname;

Only be sure that $, has its default value of '';

>A sample of the LIST file follows:
>
>////////////////////
># file needing sorted alphabetically
>Iron Mountain,spot1.html
>Badger Butte,spot2.html
>Anthony Lakes,spot3.html

With these data you don't need a Schwartzian.  Just sort the strings
as they come.

>The following is the code I have so far.  Basically, I want to sort on the
>first key (e.g., Iron Mountain), and keep the whole lines intact once
>sorting is complete.  Will the below code work?

Have you tried?  What did it do?

>///////////////////////
># sort.pl
>open LIST, ">c:\temp\fws_list";
>
>@by_spotname =
>  map { $_->[1] }

Here you build your sorted list from the sortkeys you extracted,
not the original lines which are in $_->[ 0].

>  print $_;

What is this print doing here?

>  sort { $a->[0] cmp $b->[0] }

You are using the original lines for the sortkey, not the parts
you extracted.  This happens to works with your data, incidentally.

>  map { [$_, (split /,/)[0]] }
>  <LIST>;
>
># once sorted how do I replace the original file with the sorted list?

See above.

Anno


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

Date: 01 Aug 1999 11:55:59 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: defconfaq - Q&A on arguments against the hypothetical ?? operator
Message-Id: <x7iu6zmr5c.fsf@home.sysarch.com>

>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:

  TC> This document also available at:
  TC>     http://www.perl.com/tchrist/defop/defconfaq.html
  TC>     http://www.perl.com/tchrist/defop/defconfaq.pod

thanx tom for writing a clean and unbiased look at this. it must have
been tough.

  TC>     A sidenote: Larry once suggested that perhaps defined() should
  TC>     return the thing itself, allowing us to write:

  TC>         $a = defined($b) || $c;

what if $b was 0 which is defined but false? that is one reason to have
??

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Sun, 01 Aug 1999 16:22:46 GMT
From: rurban@xarch.tu-graz.ac.at (Reini Urban)
Subject: Re: defconfaq - Q&A on arguments against the hypothetical ?? operator
Message-Id: <37a472f6.283897813@judy.x-ray.local>

thanks tom for defending common sense

you only forgot the mention that the only case is 
if the null value (0, "") is meant to be valid and true, 
in contrary to C. (0 and NULL pointer)

in those rare cases gsar's
      defined(EXPR1)
          or defined(EXPR1 = EXPR2)
          or defined(EXPR1 = EXPR3)
          or defined(EXPR1 = EXPR4);
or your
  first {defined} $foo, $bar, $baz
is really much better than any new weird operator.

Tom Christiansen <tchrist@mox.perl.com> wrote:
>This document also available at:
>    http://www.perl.com/tchrist/defop/defconfaq.html
 ... 

>    Emacs is a fine programming language, but I still prefer perl.

i'd prefer elisp or any other lisp if it had such a fine library as
perl's.
--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html


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

Date: 1 Aug 1999 10:43:42 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: defconfaq - Q&A on arguments against the hypothetical ?? operator
Message-Id: <37a4793e@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, rurban@sbox.tu-graz.ac.at writes:
:thanks tom for defending common sense

Sadly, common sense does not a common thing appear to be.  Virtually no
one else but Sarathy spoke up against this.  I nearly died the death of
a thousand paper cuts.

--tom
-- 
- Real programmers are a figment of the imagination.


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

Date: 01 Aug 1999 10:20:59 -0600
From: ljp <llornkcor@llornkcor.com>
Subject: Re: Does anyone know how to create a CGI program for Multiple Choice test using Perl on website?
Message-Id: <wklnbvfp5g.fsf@llornkcor.com>

I think what  Abigail was trying to tell you, is that you should
probably read a little on cgi programming. There are probably even
scripts already written. Just use a search engine...



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

Date: 01 Aug 1999 17:58:14 GMT
From: ltcdrmikej@aol.comno.spam (Michael James OConnor)
Subject: Re: flock me!
Message-Id: <19990801135814.19294.00001208@ng-fd1.aol.com>

From you open statement, it looks like you're trying to open a file in the root
directory. It's more likely that you are trying to open a file in the current
directory. If so, this should work:

open(FILE,"./file.txt");

-Michael James O'Connor-


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

Date: 01 Aug 1999 17:51:59 GMT
From: ltcdrmikej@aol.comno.spam (Michael James OConnor)
Subject: Flock
Message-Id: <19990801135159.19294.00001207@ng-fd1.aol.com>

Had a few questions about flock.

1) Isn't a shared lock the same as no lock at all? Is there some way of
itemizing what processes can have access to a file with a shared lock?
2) If, for some reason, a file is locked with flock then the next flock call
fails, resulting in a fallback to a fcntl call, would that mean that both
processes could access that file? From what I've gathered, those two types of
locks are oblivious to each other.
3) Does anyone have a list of which of the three locking types are available
for what operating systems? (I especially need lockf documentation.)
4) I have a list of peculiarities for each specific locking type, but I'm
always looking for more. Also, any peculiarities with operating system support
would be appreciated.

-Michael James O'Connor-


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

Date: 1 Aug 1999 17:27:40 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help opening a file
Message-Id: <7o202c$6bb$1@lublin.zrz.tu-berlin.de>

The Curz1 <thecurz1@aol.com> wrote in comp.lang.perl.misc:
>Try this instead: (Perl motto: There's more than one way to do it)
>
>open(RESULTS, $results) or die "Can't open results file: $!";
>@DATA = <RESULTS>;
>close(RESULTS);
>
>foreach $line (@DATA){
>    ($thing, $val) = split(' ', $line);
>    $data{$thing} = $val;
>}
>
>
>did not test this to make sure, but I know I have had problems using a WHILE
>loop before for this purpose. I like the FOREACH much better. Good Luck.

Please don't advise people to read a whole file into an array without
reason.  Instead of looping over the array, this does the very same
thing (except for the chomp I've added) and is more conservative in
memory usage:

my %data; # strict-proof programming
while ( $line = <RESULTS> ) {
  chomp $line; # get rid of record separator
  my ( $thing, $val ) = split ' ', $line; # again strict-proof
  $data{ $thing} = $val;
}

Anno


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

Date: Sun, 1 Aug 1999 05:30:23 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to get a sample module working (simple).
Message-Id: <f341o7.ke2.ln@magna.metronet.com>

Ramanika (ramanika@flashmail.com) wrote:

: I am not even calling the package at this point.  I just want it to be
: found.


   It _is_ being found.

   How would perl know what it is (not) returning if it could
   not even find it?


: when I call test.pl I get:

: USER.pm did not return a true value at ./test.pl line 4.
: BEGIN failed--compilation aborted at ./test.pl line 4.

: any ideas why this .pm is not found?  


   It is being found.

   The message doesn't say anything about "finding".

   It talks about what it returns.

   So the problem is related to what it returns, not finding it.


: yip I have read all the perl man pages as well.
             ^^^^^^^^^^^^^^^^^^^^^


   I think you telling us a fib.

   All of the messages that perl might generate are documented
   in the 'perldiag.pod' file that comes with perl.

   For your message it says:

----------------------------------------
=item %s did not return a true value

(F) A required (or used) file must return a true value to indicate that
it compiled correctly and ran its initialization code correctly.  It's
traditional to end such a file with a "1;", though any true value would
do.  See L<perlfunc/require>.
----------------------------------------


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


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

Date: 01 Aug 1999 10:31:36 -0600
From: ljp <llornkcor@llornkcor.com>
Subject: Re: LINUX APACHE PERL
Message-Id: <wkbtcrfonr.fsf@llornkcor.com>

more exactly-
http://www.apache.org/docs/


brian@pm.org (brian d foy) writes:

>In article <7nv9tg$e8r$1@nnrp1.deja.com>, chris18@my-deja.com wrote:
>
>>I want to know about the complete administration of a webserver running
>>on LINUX , APACHE using cgi-perl.
>>
>>can anyone tell me where I can find faqs , docs etc
>
>www.apache.org ?
>
>-- 
>brian d foy                    
>CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
>Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>




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

Date: Sun, 1 Aug 1999 05:36:28 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Looking for Perl4 for Unix
Message-Id: <se41o7.ke2.ln@magna.metronet.com>

MuXXie (handyman@asis.com) wrote:

: I thought it would be easy to find.


   Programs that have been superceded for a few *years* are often
   not easy to find.

   Can you buy Windows 3.1 nowadays?

   No surprises there.

   
: My ISP told me I can use it in my directory on their server
: if I get it and put it there myself.


   Golly. Your ISP must not care much about the security of their
   system then.

   Perl 4 (and even some versions of Perl 5) has a very serious
   bug in it that is a cracker's dream come true.

   See www.cert.org.


: But wow...what a chore... I can't even find it.


   Good.

   Look for Perl 5 instead.


: Isn't it free?  :)


   Yes, but nobody wants it.


Perl FAQ, part 2:

------------------------
=head2 What machines support Perl?  Where do I get it?

The standard release of Perl (the one maintained by the perl
development team) is distributed only in source code form.  You
can find this at http://www.perl.com/CPAN/src/latest.tar.gz, which
in standard Internet format (a gzipped archive in POSIX tar format).

Perl builds and runs on a bewildering number of platforms.  Virtually
all known and current Unix derivatives are supported (Perl's native
platform), as are proprietary systems like VMS, DOS, OS/2, Windows,
QNX, BeOS, and the Amiga.  There are also the beginnings of support
for MPE/iX.

Binary distributions for some proprietary platforms, including
Apple systems can be found http://www.perl.com/CPAN/ports/ directory.
Because these are not part of the standard distribution, they may
and in fact do differ from the base Perl port in a variety of ways.
You'll have to check their respective release notes to see just
what the differences are.  These differences can be either positive
(e.g. extensions for the features of the particular platform that
are not supported in the source release of perl) or negative (e.g.
might be based upon a less current source release of perl).

A useful FAQ for Win32 Perl users is
http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html
------------------------


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


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

Date: 1 Aug 1999 16:53:25 GMT
From: drbrain@ziemlich.org (markus)
Subject: perl 2 c converter/compiler/translater ?
Message-Id: <slrn7q8us5.d48.drbrain@josefine.ben.tuwien.ac.at>

        Hello, i was wondering if there is an perl to c converter/
compiler/translater/whatsoever available. Initially i wanted to
write a gtk+ app using Gtk-perl binding. I'm using glade to build
my gui, but the glade2perl converter does not work (it even doesn't
install correctly). So my next step would be to convert my existing
perl code to c. Any resources, hints, url ?


thanks in advice,
        Markus


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

Date: Sun, 01 Aug 1999 17:54:02 GMT
From: ffr200 <ffr200@my-deja.com>
Subject: Re: perl IP to OS mapping help
Message-Id: <7o21jo$5ok$1@nnrp1.deja.com>

Actually,
  I posted this for a friend. All of the hosts are in the
organization that I am working for and a database is being kept of
access to a utility on one of the company's internal web pages.
Thanks, all.

In article <37A0A7CA.AED5A0DE@post.utfors.se>,
  @no.no wrote:
>
> use Nmap;
> ----8<----
>
> ffr200 wrote:
>
> > hello,
> >   I need to write a perl program that receives an IP address and a
> > hostname, and is able to return an operating system and OS
> > information.  Does anyone know how to get an OS from a given IP?
Help
> > is greatly appreciated.
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
>


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


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

Date: Sun, 1 Aug 1999 05:48:21 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: pipes vs csv
Message-Id: <5551o7.ke2.ln@magna.metronet.com>

David Cassell (cassell@mail.cor.epa.gov) wrote:
: joeyandsherry@mindspring.com wrote:
: > 
: > passme

: Umm, you've written enough posts here that you can stop placing
: 'passme' at the top of the post.  This newsgroup's autobot
: is smarter than anyone else's.  :-)


   That's probably because the same message was spammed to
   another newsgroup, where the autobot is Not So Clever.


   [ Please stop spamming (we are talking "classical" spam here:
     posting the identical message individually to multiple
     newsgroups). You should instead crosspost a single message.
   ]


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


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

Date: 1 Aug 1999 18:03:50 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: reg expression
Message-Id: <7o2266$6dl$1@lublin.zrz.tu-berlin.de>

r j huntington <wolph@nycap.rr.com> wrote in comp.lang.perl.misc:
>>It's been explained more than once these last days:  If we let
>>inappropriate questions go by unchallenged, newbies will not learn
>>what is appropriate and what is not, so we'll get more of them.
>
>What has NOT been explained is why a respondant feels the need to
>INSULT the querant. There is no need to sling insults, no matter
>what the question. 

That's an entirely subjective matter.  If a poster feels the need to
sling insults, for instance after seeing the same idiotic questions
from the same no-more-entirely-newbie, who's to tell them they're
wrong?

>What would be simple is a reference to the relevant docs or FAQ.
>This certainly eliminates any need to re-answer questions 
>repeatedly while still training the newbie to read the docs/FAQs.
>
>Insulting the newbie querant is destructive, rude and unnecessary.

It is sometimes necessary to make the clueless either learn to
post reasonable questions or go away.  If so, the insult is
constructive.  Yes, it's rude.  So what?

>One would prefer that no response be given instead of an insulting
>one. Even a terse "RTFM" is preferable to being insulted.
>
>What is the objection to friendly guidance as opposed to insults?
>Why bother? Any insult to a ng reader who just needs some simple 
>guidance is an insult to us all and makes the group look bad.

I don't care if the newsgroup looks bad if it *works*.

There are some groups that strive to be an understanding and
receptive medium.  Some of the support groups are like that.  
If their participants think they are succeeding, I'm not saying
they aren't.  But take a look.  Last time I did, I got the
impression they could do with a heavy dose of cheerful rudeness.
The interminably drawn-out flamewars you get there become eventually
way more hurtful that any quick "Piss off, idiot" I've seen here.

Anno


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

Date: Sun, 1 Aug 1999 05:25:09 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: why are you so harsh to this guy ?
Message-Id: <lp31o7.ke2.ln@magna.metronet.com>

Thomas Schmickl (schmickl@magnet.at) wrote:
: Tad McClellan schrieb:

: > : what kind of sort is sort() function ? (selection sort, quick sort !?)
: >
: >       perl -ne 'print "$ARGV: $_" if /quick/i and /sort/i' *.pod
: >
: > perldelta.pod: =head2 Quicksort is internally implemented
: > perlmodlib.pod: (though having 23 called Sort::Quick is only marginally better :-).
: > perltoc.pod: =item Quicksort is internally implemented
: >
: >    You could have answered that one yourself too.
: >
: >    Stop it!
: >
: >    Your time is NOT more valuable than everyone else's.
: >
: >    Spend _some_ of yours before asking others to spend their's.


: Do you really have to be so unpolite to this guy ???


   Yes.

   When you are rude to someone, it is not unexpected that they
   will be rude in return.

   How come you are not asking Ryan why he is so unpolite to
   *thousands* of people?

   Do you defend someone who takes cuts in line?

   How about when they come back the next day and take cuts again?

   How about when they come back a few days later, and take cuts
   yet again?


: To me it seems that he simply had a question, he couldnt answer by himself.


   That is your opinion.

   My opinion is that he didn't even *try* to answer it himself
   (because the answer is so easy to find).


: Maybe he is just a beginner in perl, who couldnt just type
: "  perl -ne 'print "$ARGV: $_" if /quick/i and /sort/i' *.pod " ?


   That is Perl talk for "do a word search".

   He can do a word search however you do that on his system.
   I don't know what "his system" is, so I wrote it in Perl.
   I figure he has access to perl, or he wouldn't be posting
   here.

   If he cannot do a word search across multiple files, then
   he needs to stop programming and find out how to do a
   word search across multiple files.

   Else he will be waiting for hours, days or forever for
   someone to answer his question on Usenet, when he could
   have had the answer in less than *30 seconds!*


: What the question was about, you could have easily detect by his self-explanatory
: subject in the mail header. 


   And he could have easily answered his question without posting.

   I'm waiting for your followup to him asking him why he is
   so inconsiderate of everybody else on clpmisc...


: So if your time is that expansive, why have you read his
: posting ? 


   Because he is working stupid.

   I would like to see him working smart instead.


: Have you got a few frustrations you wanted to loose.


   Yes.

   Please sift through the hundreds of posts per day here for 
   a *few years*, then count _your_ frustrations.


: ciao, and my your problems disapear like smoke in the sky
: thomas.


   That ain't gonna happen. The world is full of pre-K "programmers".

   After putting one through kindergarten, three more show up
   to take his place.


-------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...

<Larry>  [snip]  I view a programming language as a place to be
<Larry>  explored, like Disneyland. You don't need to have a lot of preparation
<Larry>  to explore a theme park.  You do have to go along with the crowd
<Larry>  control measures, though.  In a sense, each ride has its own
<Larry>  prerequisites--if you cut in line, you risk getting tossed out of the
<Larry>  park.
<Larry> 
<Larry>  What we have here in this newsgroup is a failure in crowd control.
<Larry>  Reading the FAQ is like staying in line--it's something you should
<Larry>  learn in kindergarten.  Usenet needs a better kindergarten.
-------------------------------------


There is some "history" behind my followup.

Here are some of Ryan's past postings.

I am a regular here, so I remembered them.

You can look them up at www.deja.com if you want to see them
yourself.


-------------
Date: 1999/06/01

Q:   how to sort by values

A:    Perl FAQ, part 4:

      "How do I sort a hash (optionally by value instead of key)?"

-------------
Date: 1999/06/19

Q: is there any command to translate perl script to c source file

A: Perl FAQ, part 3:

   "How can I compile my Perl program into byte code or C?"

-------------
Date: 1999/06/20

Q: i'm setting Linux Apache
   ......it's not work!...... it can only show html, but not cgi

A: This question is Perl-content free, yet it was posted to the
   Perl newsgroup.

   Perl questions should be asked in the Perl newsgroup.

   Server setup questions should be asked in a server newsgroup.

-------------
Date: 1999/07/16

Q: Subject: Get Time , Less Than a second

A: Perl FAQ, part 8:

   "How can I measure time under a second?"

-------------
Date: 1999/07/29

Q: %HASH = ( "k" => [1,2,3] );
   $x = $HASH{ "k" }-> [1]++;
   print $x;
                       
   ...... the result is "2" but i expect "3";...... why this not work !?

A: because that is the defined behavior for postfix increment.

   from perlop.pod:

      "++" and "--" work as in C.  That is, if placed before a variable,
      they increment or decrement the variable before returning the value, 
      and if placed after, increment or decrement the variable after 
      returning the value.

-------------
Date: 1999/07/29

Q: why can't i do this:
                       
   test();
                       
   sub test{
      my $a;
      my $b;
      my %HASH=("a"=>5,"c"=>7,"b"=>6,"d"=>8,"z"=>10,"x"=>9);
                       
      my @SBV = sort { $HASH{$a} <=> $HASH{$b} } keys %HASH;

A: the description for sort() in perlfunc.pod says:

   "package global variables $a and $b (see example below).  
    They are passed by reference, so don't modify $a and $b.  
    And don't try to declare them as lexicals either."

   He has declared them as lexicals!

-------------
Date: 1999/07/30

Q: by sorting the [1] of array if the [1] of array is equal then
   perform second sort on [0]

A: The answer for Perl FAQ, part 4:

   "How do I sort an array by (anything)?"

   Has this:

   "If you need to sort on several fields, the following paradigm is useful."

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


   Each of those questions was probably read by thousands of people!

   Some of them probably also took the time to followup.

   There is a Whole Bunch of wasted time directly attributable to
   Ryan being too lazy to even try and find the answer himself.

   He doesn't need to try like everybody else does. He can just
   post to clpmisc and some fool will read the docs *for him*.

   I don't think so...


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


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

Date: 1 Aug 1999 15:14:37 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Why won't this little script work?
Message-Id: <7o1o8t$656$1@lublin.zrz.tu-berlin.de>

Tim  <bie@connect.ab.ca> wrote in comp.lang.perl.misc:
>This is a multi-part message in MIME format.

Don't do that.  Usenet is a text-only medium.

>--------------2B8D604B463E
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>Hello,
>
>I have no idea why this won't work. everything looks right 2 me
>Please help me

There's an error in line 17.

Seriously, what do you expect us to do?  Extract your code from
the posting, decoding the part you encoded, install everything
on a web server, run it, divine what it is supposed to do, debug
it and tell you what's wrong?  You're either very naive or a
demanding...  Let's settle for naive.

Anno


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

Date: Sun, 01 Aug 1999 08:31:39 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Why won't this little script work?
Message-Id: <37A4685B.8389A041@mcmahon.qal.berkeley.edu>

Tim wrote:
> 
> Hello,
> 
> I have no idea why this won't work. everything looks right 2 me
> Please help me

Oy, vey!

- What do you mean by 'doesn't work'? What does it do or not do?
- What in the world is that horrible signature of yours doing there?

-- 
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu  
       http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------


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

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

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


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