[11019] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4619 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 11 13:02:10 1999

Date: Mon, 11 Jan 99 10:00:17 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 11 Jan 1999     Volume: 8 Number: 4619

Today's topics:
    Re: $32.00 to order RedHat! dave@mag-sol.com
    Re: AN EASY WAY TO FTP IN PERL? dave@mag-sol.com
    Re: BUG: getpwnam()? - Perl shipped with RedHat5.2 <dumbkid@ix.netcom.com>
    Re: BUG: getpwnam()? - Perl shipped with RedHat5.2 <dumbkid@ix.netcom.com>
        Compiled Perl Oddities dgbialac@wwitch.unl.edu
    Re: file date/time-stamp ? dave@mag-sol.com
    Re: How can I compare two arrays? <uri@home.sysarch.com>
    Re: How to equalize a variable to a string containing a <aqumsieh@matrox.com>
    Re: Invoking an unattended infinite loop <jdf@pobox.com>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Perl Criticism <jeromeo@atrieva.com>
    Re: Perl Criticism <jeromeo@atrieva.com>
    Re: Perl TK text question <lusol@Pandora.CC.Lehigh.EDU>
    Re: Req: HTMl parser script/module <jdf@pobox.com>
        Sendmail question (John )
    Re: Someone asked how to capitalise first letter of eac <aqumsieh@matrox.com>
    Re: Submitting a script result to a web server dave@mag-sol.com
        Trying to find day of week from date <antispam@antispam.com>
    Re: Year 2000 and Perl <debot@xs4all.nl>
    Re: Year 2038 problem <mike@crusaders.no>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 11 Jan 1999 16:56:16 GMT
From: dave@mag-sol.com
Subject: Re: $32.00 to order RedHat!
Message-Id: <77dafe$rss$1@nnrp1.dejanews.com>

In article <369A07D6.B00869A5@email.com>,
  Eirik Johansen <webpages@email.com> wrote:
> Hi!
>
> I'm about to order the RedHat 5.2 distro. I was told that it costs
> $49.95 and thought that was a fair price, but they want to charge $32.00
> for delivery, which I feel is too much!
>
> I figured that RedHat probably has its office in the US, and I live in
> Norway and that's probably why it cost so much. But they had no other
> delivery options (menaing cheaper ones...)
>
> Are there any places, say in the UK, that also sell the 5.2 version of
> RedHat or is there another way to order it without having to pay so much
> for the delivery?

 ...and your Perl question was?

Dave...

p.s. Try the PC Bookshop in the UK <http://www.pcbooks.co.uk/>

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

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


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

Date: Mon, 11 Jan 1999 16:54:34 GMT
From: dave@mag-sol.com
Subject: Re: AN EASY WAY TO FTP IN PERL?
Message-Id: <77dac8$rpi$1@nnrp1.dejanews.com>

In article <369a170e.0@norbert.cerbernet.co.uk>,
  "Chris Denman" <c-denman@dircon.co.uk> wrote:
> Has anyone got some code that will let me ftp a file?
>
> I have a form, which will upload a file.  Then I want to ftp this file to
> another server.
>
> Is this easy?

It's a lot easier with the Net::FTP module available from CPAN
<http://www.perl.com/CPAN/>.

hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

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


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

Date: Mon, 11 Jan 1999 10:18:58 -0600
From: DumbKid <dumbkid@ix.netcom.com>
Subject: Re: BUG: getpwnam()? - Perl shipped with RedHat5.2
Message-Id: <369A2472.EDA16081@ix.netcom.com>

M.J.T. Guy wrote:
> 
> DumbKid  <dumbkid@ix.netcom.com> wrote:
> >
> >I have install RedHat5.2 in both Intel and Alpha machines.
> >I have no way to get the "realname" of the users in /etc/passwd
> >file using Perl5.005m4-1
> 
> For reasons known only to RedHat, they shipped release 5.2 with an
> unsupported, unreleased development version of Perl.    It has various
> problems.    I don't know if this is one of them, but before proceeding
> further, install a released version of Perl from CPAN.
> 
> Mike Guy

I did tried to install perl5.005-02 compiled from source. However,
when make test, it only shows 91% is good (is working).

I am using an 164LX Alpha machine with Redhat5.2 freshly installed.

Regards,
Tom


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

Date: Mon, 11 Jan 1999 10:12:57 -0600
From: DumbKid <dumbkid@ix.netcom.com>
To: eugene@snailgem.org
Subject: Re: BUG: getpwnam()? - Perl shipped with RedHat5.2
Message-Id: <369A2309.EE9463BB@ix.netcom.com>

Eugene Sotirescu wrote:
> 
> What do you mean, you have no way? What's the output you get?
> 
> Your Perl script works fine on my machine (RH 5.2 Intel).
> 
> You might try a more elaborate version, including the -w flag:
> 
> #!/usr/bin/perl -w
> 
>   if (@pwent = getpwnam("snailgem")){
>     print "pwent is @pwent \n";
>   }
>   else { die "no such user\n";}
> 
> outputs:
> snailgem EBiI5PjvSvhAM 503 504    /home/snailgem /bin/bash

This is exactly what I mean. Can you find your realname in the
above output?? :)




> 
> DumbKid wrote:
> 
> > Hi all,
> >
> > I have install RedHat5.2 in both Intel and Alpha machines.
> > I have no way to get the "realname" of the users in /etc/passwd
> > file using Perl5.005m4-1
> >
> > However, using standard C can get the realname no problem. Is it
> > just me or there is a bug in perl package w/ redhat5.2
> >
> > PERL
> > ====
> >
> >   #!/usr/bin/perl
> >
> >   my(@pwent) = getpwnam("username");
> >   print "@pwent \n";
> >
> > Standard C
> > ==========
> >
> >   #include <stdio.h>
> >   #include <pwh.h>
> >   #include <sys/types.h>
> >
> >   main()
> >   {
> >      struct passwd *pwent;
> >      pwent = getpwnam("username");
> >      printf("realname = (%s) \n", pwent->pw_gecos);
> >   }
> >
> > Any idea?? Both Intel and Alpha distributions have this problem.
> >
> > Regards,
> > Tom


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

Date: Mon, 11 Jan 1999 16:48:07 GMT
From: dgbialac@wwitch.unl.edu
Subject: Compiled Perl Oddities
Message-Id: <77da06$rbs$1@nnrp1.dejanews.com>

I've noticed a couple oddities with compiled perl that I wanted to inquire
about.	First, I found that although I am running a "compiled" script, Perl
still wants access to some of it's internal .pl scripts.  I noticed this
because our experimental perl exec dumper is located in a different path from
our "production" perl resulting in errors.  I of course resolved this by
pushing the "production" path onto @INC.  Is there a way to get these files
compiled into the binary?

Second, I noticed that recursion runs significantly faster when using
uncompiled perl.  Any of the source authors know why this is the case?	I
would assume it would have to do with the way that memory allocation works,
but it could be some other factor.

Note that I am dumping executables through the -u option & gnu emacs unexec,
not using the code extensions.	Further, the platform is Solaris 2.6 on a
Sparc 10 (vs. using Intel).

David Bialac
Ameritrade

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


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

Date: Mon, 11 Jan 1999 16:59:30 GMT
From: dave@mag-sol.com
Subject: Re: file date/time-stamp ?
Message-Id: <77dalg$ruo$1@nnrp1.dejanews.com>

In article <369A0AE5.51D14EE8@amc.uva.nl>,
  j.w.draijer@amc.uva.nl wrote:
> Hi there,
>
> How can i get a date- and timestamp from a file? I already have a
> filehandle.
>
> Thanks for any help.

perldoc -f stat

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

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


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

Date: 11 Jan 1999 12:17:38 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: How can I compare two arrays?
Message-Id: <x7g19hiv9p.fsf@home.sysarch.com>

>>>>> "J" == JPAH-FLA  <mymail@nospam.com> writes:

here are some perlish answers. most can be done with stuff you don't
seem to know about.

  J> (sum of all elements in A): +/A

$sum = 0 ; $sum += $_ foreach @A

  J> (has A a non-zero value?): v/A

grep( $_ != 0, @A )

  J> (generate an array of values 1 thru N): iN

( 1 .. $N )

  J> (is A all non-0?) ^/A

grep( $_ == 0, @A )

  J> (is array A the same as, elementally, B?): ^/A=B


  J> (length of A): pA

@A	in a scalar context
$#A	last index of @A

  J> (randomly reorder A): A[?ipA]

push( @rand_A, splice( @A, int( rand( @A ), 1 ) ) ) while @A

  J> (make A into an N by M matrix) N M pA
  J> (invert Matrix A) (domino)A
  J> (largest value in A): (ceiling)/A

$max = $A[0] ; $_ > $max && $max = $_ foreach @A ;

  J> (smallest) (floor)/A

$min = $A[0] ; $_ < $min && $min = $_ foreach @A ;

  J> (concatenate array B to A): A,B

push( @A, @B ) ;

  J> (laminate B below A) A,[1.5]B

splice( @A, 0, 0, @B ) 
splice( @A, 0, 0, @B[0 .. 4] ) 

you don't say if you want all of b or part of it

  J> (make a new array of the first n-elements of A) N(take)A

@A[ 0 .. N - 1]

  J> (make a new Array by removing the last N elemets of A): N(drop)A
@A[ $#A - N + 1 .. $#A]

  J> (Make a new array of element N and M): A[M N]

@a[ M, N ]

  J> (cross product of A with B): A +.*B
  J> and so on....

  J> Now I know SOME of these are supported in Perl without writing a loop-
  J> reverse and concatenate come to mind. But (a) I can't optimize a loop as
  J> well as the guy who writes the compiler, and (b) I don't want to write
  J> loops for these types of problems over and over again. Make them part of
  J> the language. Its much easier to work outside of loops for the developer,
  J> and one of Larry's design critera was to create a tool to solve problems
  J> quickly. Its MUCH faster to write the constructs above than to loop.


remember, perl is not matrix oriented like apl (not much is oriented
like apl). other than matrix stuff like inversion, multiplication and
reshaping perl can do most with builtin stuff. a few need tight foreach
modifier loops. and some of the matrix stuff i bet is done in CPAN
modules where it belongs since you need the speed of C there.

learn more perl before you think it can't do something. it isn't called
the swiss army chainsaw of languages for nothing.

you obviously have never seen splice, array slices in particular. wait
til you get ahold of hash slices, something apl doesn't have. i don't
even think it has hashes either.

hth,

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Mon, 11 Jan 1999 11:55:39 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: How to equalize a variable to a string containing a @
Message-Id: <x3yww2t4ulw.fsf@tigre.matrox.com>


"Flip" <flip@nym.alias.net> writes:

> This works:
> { $Config{'variable'} = testtest.com }

I suspect you're not using the -w switch here or else the compiler
would have warned you about the bare word.

> 
> This doesn't:
> { $Config{'variable'} = test@test.com }
> 

you should single-quote your bare-words to protect the special
characters in them (like @).

$Config{'variable'} = 'test@test.com';

or you can double-quote, but then you have to escape your special
characters:

$Config{'variable'} = "test\@test.com";



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

Date: 11 Jan 1999 18:40:57 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: Jim Rhodes <jim@nospam.deadlock.com>
Subject: Re: Invoking an unattended infinite loop
Message-Id: <m33e5h1zdi.fsf@joshua.panix.com>

Jim Rhodes <jim@nospam.deadlock.com> writes:

> If I run it from the command line or my browser it trundles
> along merrily until my telnet session or browser times out,
> then it stops.

   $ man nohup

   $ man (whatever shell you use)
   read about backgrounding a process

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 11 Jan 1999 17:12:27 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <77dbdr$bcv$2@info.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 04 Jan 1999 17:02:45 GMT and ending at
11 Jan 1999 07:51:35 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1998 Greg Bacon.  All Rights Reserved.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  288 (50.6% of all posters)
Articles: 433 (29.0% of all articles)
Volume generated: 701.3 kb (26.2% of total volume)
    - headers:    308.5 kb (6,431 lines)
    - bodies:     384.5 kb (11,902 lines)
    - original:   262.7 kb (8,447 lines)
    - signatures: 7.9 kb (208 lines)

Original Content Rating: 0.683

Averages
========

Posts per poster: 1.5
    median: 1.0 post
    mode:   1 post - 212 posters
    s:      1.5 posts
Message size: 1658.5 bytes
    - header:     729.6 bytes (14.9 lines)
    - body:       909.3 bytes (27.5 lines)
    - original:   621.3 bytes (19.5 lines)
    - signature:  18.6 bytes (0.5 lines)

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

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

   15    19.9 ( 12.1/  7.8/  5.7)  Staffan Liljas <staffan@ngb.se>
   11    25.2 (  8.7/ 16.4/  2.5)  Eugene Sotirescu <eugene@snailgem.org>
    7    10.4 (  4.4/  6.0/  5.9)  Zack <zack44@altavista.net>
    7    10.4 (  4.9/  5.6/  3.4)  Bruce Chu <chub@healtheon.com>
    6     7.2 (  4.2/  3.0/  2.4)  2n3055@usa.net (Steven Chan)
    6    10.2 (  5.6/  4.6/  3.6)  Hrvoje Niksic <hniksic@srce.hr>
    5     5.9 (  4.0/  1.9/  1.2)  Brian Deitte <bdeitte@blue.weeg.uiowa.edu>
    5    19.6 (  3.8/ 15.8/  6.8)  Eirik Johansen <webpages@email.com>
    4     3.5 (  2.5/  0.9/  0.9)  Anandan Balaji <anandan_balaji@mentorg.com>
    4     5.5 (  3.5/  2.0/  0.6)  Ernesto Gianola <netog@ziplink.net>

These posters accounted for 4.7% of all articles.

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

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

  25.2 (  8.7/ 16.4/  2.5)     11  Eugene Sotirescu <eugene@snailgem.org>
  19.9 ( 12.1/  7.8/  5.7)     15  Staffan Liljas <staffan@ngb.se>
  19.6 (  3.8/ 15.8/  6.8)      5  Eirik Johansen <webpages@email.com>
  13.1 (  0.7/ 12.4/ 11.1)      1  "Keith Rippin" <KGRippin@pcgenius.demon.co.uk>
  10.4 (  4.9/  5.6/  3.4)      7  Bruce Chu <chub@healtheon.com>
  10.4 (  4.4/  6.0/  5.9)      7  Zack <zack44@altavista.net>
  10.2 (  5.6/  4.6/  3.6)      6  Hrvoje Niksic <hniksic@srce.hr>
  10.2 (  3.0/  7.2/  3.2)      3  paxton@cyberstrider.org
   9.6 (  3.5/  6.0/  2.5)      4  "Barry G. Sumpter" <bsumpter@msn.com.au>
   8.4 (  1.2/  7.3/  4.4)      2  Francois PICHARD <fpichard@siris.fr>

These posters accounted for 5.1% of the total volume.

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

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

1.000  (  0.9 /  0.9)      4  Anandan Balaji <anandan_balaji@mentorg.com>
0.990  (  3.1 /  3.2)      3  placeit@easyad.com (Marc Austin)
0.979  (  5.9 /  6.0)      7  Zack <zack44@altavista.net>
0.793  (  4.2 /  5.3)      4  Edmond Shum <shum@cig.mot.com>
0.787  (  2.4 /  3.0)      6  2n3055@usa.net (Steven Chan)
0.783  (  3.6 /  4.6)      6  Hrvoje Niksic <hniksic@srce.hr>
0.764  (  2.3 /  2.9)      3  Jon Lewis <jlewis@gnv.fdt.net>
0.721  (  5.7 /  7.8)     15  Staffan Liljas <staffan@ngb.se>
0.717  (  2.7 /  3.8)      3  Tom Jenquin <tom_jenquin@mgic.com>
0.692  (  1.3 /  1.8)      3  Brian McCauley <B.A.McCauley@bham.ac.uk>

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

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

0.493  (  0.6 /  1.3)      3  comdog@smithrenaud.com (brian d foy)
0.453  (  3.2 /  7.2)      3  paxton@cyberstrider.org
0.430  (  6.8 / 15.8)      5  Eirik Johansen <webpages@email.com>
0.421  (  2.5 /  6.0)      4  "Barry G. Sumpter" <bsumpter@msn.com.au>
0.377  (  0.3 /  0.9)      3  Per Kistler <pk@dwc.ch>
0.348  (  0.8 /  2.2)      3  Michael Konopka <mkonopka@sic32135.fsic.ford.com>
0.294  (  0.7 /  2.3)      3  collin.starkweather@colorado.edu
0.291  (  1.4 /  4.9)      3  Craig Berbling <craig.berbling@pobox.com>
0.285  (  0.6 /  2.0)      4  Ernesto Gianola <netog@ziplink.net>
0.149  (  2.5 / 16.4)     11  Eugene Sotirescu <eugene@snailgem.org>

27 posters (9%) had at least three posts.


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

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

      18  "Slick69" <tekennedy@usa.net>
      10  "Fearless Also" <miikementzer@worldnet.att.net>
      10  "Joe Bloggs" <coolmrjoeboggs@yahoo.com.omit>
      10  pauls@wauknet.com (Paul Smith)
      10  richmann@concentric.net
      10  fucaufled@aol.com (FUCAUFLED)
      10  joemama@roundtrip.net
      10  "Porky" <pigsty@magicnet.net>
      10  Matthew Wootton <Matt@akooka.demon.co.uk>
       8  "duz" <insert@email.address>


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

Date: Mon, 11 Jan 1999 09:11:30 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
Subject: Re: Perl Criticism
Message-Id: <369A30C2.F9DAFA88@atrieva.com>

topmind@technologist.com wrote:
> 
> Reply to  Jerome O'Neil's 1/7 message:
> 
> >> [I did NOT say Unix has *only* command lines.
> You didn't?]  What is this all about then: ... <<
> 
> I said the equivalent of "cat's have only one tail", but your interpretation
> is that I said, "There are only cat's here".

I see.  You said an obviously indefensible thing, then decided to use
the "But that's not what I meant" defense.  Lets run that through the
parser..

#!/usr/bin/perl -w
use Debug::Psychic
my($groker) = new Psychic();

my($pontificaton) =<< MORON;
Since there is only one command line, UNIX programmers have a tradition
of
trying to fit as much on one line as possible. 
MORN

print $groker->prognosticate($pontificaton);

%vortex: prognosticate.

The oracle says:  This pontificator doesn't know what he's talking
about, but I'll bet he can read this 'cryptic code'.
 
> Do you get it now? Or do you still want to play word trivia?

Do you get it now, or do you still want to try and convince us you are
qualified to speak on these matters?
 
> >> Example #2, for instance.  I have written
> mission critical military applications in sh. <<
> 
> Video games can be written in COBOL. But that does not prove anything.

What?  You mean that you were *wrong* when you said "scripting
languages" were unfit for mission critical military applications?  

> (Perhaps I will move to China after hearing that the military let a firemouth
> like you write software for them.

I am proud to have defended your right to be a communist.

>...The same people that put NT on submarines.

So now you are an expert on military technology, too?  Tell me, did you
think it a mistake for NOSC to switch from HP to Sun when they deployed
JOTS II?  I didn't.  Those old SPARCs could fly!
 
> >> Pro: They are convenient and easily understood.  That's a Good Thing. Con:
> They are misunderstood by people with an obvious axe to grind and
> a penchant for ignoring the documentation. <<
> 
> Their convenience is not that great, but their abusability is. The difference
> between "=" and "==" can and does cause a zillion headaches, for example. I
> don't see why you think they are so wonderful. 5% convenience improvement with
> a 200% abusability increase.

Here is the gist.  You want to protect me from myself (much like the
government).  Big Boy code mongers prefer to have the machine do what
they tell it to do, not the other way around.  If you find yourself
unable to discern the difference between an assignment and an equality
operator, perhaps you should look into a new line of work.
 
> Why are they so darn "convenient" and indespensable? I have not seen one
> example of their indespensability.

They are convenient.  That makes them less dispensable than something
else that isn't as convenient.
 
> You must never had to maintain OTHER'S code.

I maintain others code every day.  Fortunately, I am versed in the
languages required, and it doesn't take too long to discern what the
author was trying to do.  We also have coding standards that we try to
meet, and gosh-a-golly, we don't have to write them into our code and
clutter things up, as some "Top Minds" have suggested as a good idea.

> >> You even offer a "prewhile()" construct as analternative.  No pro's,
> though.  <<
> 
> The "pro" is that they DONT LEAK! Do you need something more explicit?

That is not a "pro."  You have taken away a convienient and easily
understood construct. Do you need something more explicit?  

And we were discussing the pro's *you* alegedly "worded".  To wit:

===QUOTE===
>> I consider any language that does not return a value from an assignment
broken.  If it's the rvalue, that's a Good Thing. <<

What is your criteria for stating that? Because you are just plain used
to it?
Nicotine? I worded the pros and cons if it. Where's your's?
===UNQUOTE===
 
> >> What you propose is a cute version of VisualBasic.
> Been there, done that, it sucks. <<
> 
> That must be why it is more popular than Perl even though it costs money.
> ("better", not "cute".)

More popular with who?  Amateur know-it-alls?
 
> As a test of your articulateness, what was it exactly about VB that you did
> not like?

Performance, primarily.  Cost and portability secondarily.  
 
> Note that I would much rather maintain someone else's VB code than someone
> else's Perl code. However, for my personal use, Perl is fine with me because I
> am familiar with my own pattern of abuse.

Of course you would.  You clearly don't understand perl, so you can
write as much bad code as you want.  More advanced constructs confuse
you, so they become "cryptic."
 

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: Mon, 11 Jan 1999 09:23:14 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
Subject: Re: Perl Criticism
Message-Id: <369A3382.7E06766@atrieva.com>

topmind@technologist.com wrote:
> 
> In article <369687C1.7F6C9A58@atrieva.com>,
>   Jerome O'Neil <jeromeo@atrieva.com> wrote:
> > This guy is too danged amusing to killfile.  He's like one of those
> > blow-up clowns that just keeps getting back up.
> >
> 
> Because I am FRICKEN RIGHT!!!

Actualy, you are DEAD WRONG!!!
 
> Nobody ever really countered my OOP criticism. They simply insulted
> me personally or chewed me out for "not keeping the faith
> that OOP will ONE DAY pay off when average programmers learn
> it better."

OOP?  Whazzat?  Oh, just one more thing that perl will let me do, or
not, as the situation merits.
 
> Nobody cited any peer-reviewed, objective study that
> showed OOP was better. Only train-hoping self-proclaimed
> gurus (Which some have accused me of being. If true,
> that makes us even.)

I consider this thread a "peer review" of your "objective study."   You
have clearly not met the bar.  Perhaps next term. 


-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: 11 Jan 1999 16:21:27 GMT
From: "Stephen O. Lidie" <lusol@Pandora.CC.Lehigh.EDU>
Subject: Re: Perl TK text question
Message-Id: <77d8e7$22ag@fidoii.cc.Lehigh.EDU>

Tom Turton <tturton@cowboys.anet-dfw.com> wrote:
> This is a multi-part message in MIME format.
> --------------38556B77D09EC75B1E1B3D04
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

> Trying to experiment with Tk from Advanced Perl Programming, chapter 14
> "Text and Entry" section, but I can't seem to get things to work.  Found
> the errata section online at O'Reilly showing that the text and
> positioning fields in the book are swapped.  Even fixing this, I am
> still not getting expected behavior.  Below is my source code and
> results.  Appreciate any and all help.   Thanks.

> ---Tom Turton

There are *many* errors in this Tk program from Advanced Perl Programming.
The worst are the omission of leading dashes for parameters.  Why the author
did this is beyond me.... 


> #!/usr/local/gnu/bin/perl -w
> use Carp;
> use diagnostics;
> use Tk;

> $top = MainWindow->new();

> $t = $top->Text(width =>80, height => 10)->pack();

*All* Perl/Tk widget attributes must have a leading dash.  If the errata
doesn't reflect this then the errata is incomplete.  The reason is simple:
Perl/Tk is derived from Tcl/Tk and the dashes are manditory - the mere fact
that you can omit them sometimes and it works is plain luck.  So the above line
is properly written thusly:

	$t = $top->Text(-width =>80, -height => 10)->pack();

You *will* get burned if you omit the dashes, sooner rather than later !!!

The next three lines are completely wrong, the code was never tested I'd
wager.

> $t->insert("2.5", "Sample");
> $t->insert('3.10', 'Sample3');
> $t->insert('insert +5', 'Sample2');

> MainLoop();      


> If running the above, I get the following error:

> Uncaught exception from user code:
>         bad text index "insert +5" at text.pl line 11.

That's because he never specified +5 what!  Characters, lines?

> If I comment out that line, and run with just the "Sample" 
> and "Sample3" msgs, I get:

> SampleSample3

> i.e., seems to ignore the Row.Column field.

Again, the code was never tested.  If "2.5" (line 2, char 5) doesn't exist
then the string is inserted after the mark "end".  And since the strings have
no "\n" they just get appended.

Run this version, it'll make more sense:

#!/usr/local/gnu/bin/perl -w
use Carp;
use diagnostics;
use Tk;

$top = MainWindow->new;

$t = $top->Scrolled('Text',-width =>80, -height => 10)->pack();
foreach (1..15) {
    $t->insert('end', "line $_\n");
}
$t->insert("12.0", "Sample");
$t->insert('3.10', 'Sample3');
$t->insert('insert +5 chars', 'Sample2');

MainLoop;

Looks like I should read the Tk chapters....

Steve
--
Stephen.O.Lidie@Lehigh.EDU
Lehigh University Computing Center, USA


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

Date: 11 Jan 1999 18:52:07 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: j.bessels@wolverine.demon.nl (Serial # 0)
Subject: Re: Req: HTMl parser script/module
Message-Id: <m3yan9zohk.fsf@joshua.panix.com>

j.bessels@wolverine.demon.nl (Serial # 0) writes:

> What I'm looking for is a more advanced parser which can for example
> deal with $if then else constructs in HTMl templates, have while
> loops etc.

A brief web search turned up the following.  I'm sure you can find a
good deal more like them.

   http://www.winwinsoft.com/atp/PerlPP_users_guide.html
   http://www.evoscript.com/

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Mon, 11 Jan 1999 17:21:22 GMT
From: John@melon17.freeserve.co.uk (John )
Subject: Sendmail question
Message-Id: <369a31dc.5292498@news.freeserve.net>

Everytime i use sendmail I
get a standard 'From' string
automatically entered. In other
my email is from the same poster
(my server username), everytime I 
check my email.

It appears to automatically overide
my perl script.

My script appears to control several
variables, but not this one.

Any suggestions on how I can control
the 'From' dispalyed in my incoming email 
box?

john


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

Date: Mon, 11 Jan 1999 10:57:45 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Someone asked how to capitalise first letter of each word
Message-Id: <x3yyan94xae.fsf@tigre.matrox.com>


morris@rahul.net (Steve Morris) writes:

> 
> #!/usr/bin/perl -w
> while(<DATA>){
>         s/\b(\w)/\U$1/g;
>         print;
> }

WRONG! 
That would turn words like "don't" into "Don'T".
RTFM .. it's better than re-inventing the wheel.



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

Date: Mon, 11 Jan 1999 17:02:18 GMT
From: dave@mag-sol.com
Subject: Re: Submitting a script result to a web server
Message-Id: <77daqo$s9j$1@nnrp1.dejanews.com>

In article <77d4vr$mng$1@nnrp1.dejanews.com>,
  Ryan.Haman@mci.com wrote:
> I have a PERL script that is being executed daily by a cron job.  In the
> script, I want it to submit information to our web-based paging system. Is it
> possible to submit a URL to a web server even though I'm not using a browser?

Look at the libwww bundle of modules from CPAN <http://www.perl.com/CPAN/>,
particularly the LWP::Simple module.

hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

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


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

Date: Mon, 11 Jan 1999 18:17:25 +0000
From: Thomas Merlin <antispam@antispam.com>
Subject: Trying to find day of week from date
Message-Id: <369A4035.41561C2@antispam.com>

Hello,

I'm trying to find which day matches a date.
Example : I have 01/07 in a text file I'm parsing, I'd like to get the
information that that date is a Thursday.

I only know how to get the current date's day, not the day of a date I
give as an argument.

I know this has to do with timelocal and/or localtime but I'm lost.

Thanks for any help !

Thomas.




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

Date: Mon, 11 Jan 1999 18:51:28 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: Year 2000 and Perl
Message-Id: <369A3A20.554329B5@xs4all.nl>

It's not tested yet (I think). But if you're realy smart you can avoid
that problem.



Sebastian Stiegler wrote:

> Does anyone know, if Activestate Perl 5.06 is Year 2000 tested???
>
> Basti

--
Hi, this piece is put automaticly under every mail from me.

Contact me: debot@xs4all.nl
Visit my page:  http://www.debot.nl/
    http://www.geocities.com/SunsetStrip/Frontrow/4346/top50index.html

I've much more homepage. You can just ask for them if you want.

Well, more I havn't to say, so have a nice day :-)




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

Date: 11 Jan 1999 17:51:35 GMT
From: Trond Michelsen <mike@crusaders.no>
Subject: Re: Year 2038 problem
Message-Id: <77ddn7$krn$1@romeo.dax.net>

On 11. Jan 17:33, John Robson wrote:

> I heard that Perl and perhaps Linux as well have a 'year 2038'
> problem. 
> Has something to do with an internal 32-bit reperesentation.  
> Just out of curiosity, can someone explain to me where this '2038'
> number come from?  What does it entail?

this is when the "number of seconds since jan 1. 1970(i think...)" is
larger than a signed 32-bit integer and rolls over to 0.

If I'm not mistaking (I just might) this number is represented as an
32-bit integer only if you're using a 32-bit computer. If this is the
case I'll claim that the date-rollover is not your biggest problem if
you're still using a 32-bit computer in 2038.

-- 
  // Trond Michelsen
\X/  mike@crusaders.no


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

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


Administrivia:

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

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

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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

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