[11106] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4707 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 21 01:05:52 1999

Date: Wed, 20 Jan 99 22:01:29 -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           Wed, 20 Jan 1999     Volume: 8 Number: 4707

Today's topics:
    Re: Perl Criticism <mds-resource@mediaone.net>
    Re: Perl Criticism topmind@technologist.com
    Re: Perl Criticism topmind@technologist.com
    Re: Perl Criticism topmind@technologist.com
    Re: Perl problem :(Offline mode... (Tad McClellan)
        problems with IIS & mime types (jm)
    Re: Sorting Alphanumeric (Tad McClellan)
    Re: Status of Threaded Perl (Fluffy)
    Re: Using GetOptions? (Damian Conway)
    Re: write is trimming trailing blanks? <bradleyb@megsinet.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 20 Jan 1999 21:31:06 -0600
From: "Michael D. Schleif" <mds-resource@mediaone.net>
Subject: Re: Perl Criticism
Message-Id: <36A69F7A.9ED861BB@mediaone.net>

OK, I'll bite.  What in the world is a ``quasi-OS?''

I challenge anybody to run any publicly available version of winDoze
v3.x *without* DOS also running on that same processor!  (Please, don't
WINE ;)

Are you intimating that micro$oft achieved that wild dream of running
two (2) operating systems *concurrently* on the same processor?

Or, are you denying that DOS qualifies as an OS?

Or, can you be grasping at straws, intimating that winDoze3 was capable
of performing some functions normally ascribed to operating systems?

I'd expect better of Tivoli }:-^

John Warner wrote:
> 
> Win 3.1 was a quasi-OS.  Win31 did most of the things a normal OS does with the
> exception of disk I/O.  However, its fundamental flaw was that it attempted to provide
> a multithreaded environment while it ran in a singly threaded environment (DOS).  The
> closest analogy I can think of is attempting to balance a set of blocks arranged in an
> upside down pyramid on a toothpick--sooner or later the blocks _will_ fall.

-- 

Best Regards,

mds
mds resource
888.250.3987

"Dare to fix things before they break . . . "

"Our capacity for understanding is inversely proportional to how much we
think we know.  The more I know, the more I know I don't know . . . "


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

Date: Thu, 21 Jan 1999 05:27:59 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <786dsn$o0l$1@nnrp1.dejanews.com>

In article <785dek$ras$1@nnrp1.dejanews.com>,
  droby@copyright.com wrote:
> In article <36A4DFF5.9F05184F@lmco.com>,
>   James B Crigler <james.b.crigler@lmco.com> wrote:
> > Replying to topmind, Daniel Grisinger wrote:
> >
> > > >                                      Do you all use only one
> > > > language and/or always keep them strait?
> > >
> > > >                                           (I am sure a few
> > > > do keep them strait, but don't exprapolate your greatness
> > > > in such a narrow area to everybody else.)
> > >
> > > Ability to use your tools is not a sign of greatness.
> >
> > Including basic knowledge of spelling and grammar (and sometimes
> > gramper! ;-) should be included in the toolset.  Topmind is
> > evidently lacking in these, to wit:  s/strait/straight/
> > and s/exprapolate/extrapolate/.  The latter even a spelling checker
> > would have caught.
>
> This thread is bad enough without going into a spelling and grammar war.
>
> And topmind's logic is bad enough that we don't need to resort to that.


Okay, my spelling is "excessively phonetic", but

Give one example of bad logic!

Einstein's hair was messy, but people still listened to him.
(I am not comparing myself to Mr.E, just saying that there
are some people who can pay attention to the message instead of
the envelope)


>
> Anyway, it's supposed to be over.  Hitler has been invoked.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own
>

-tmind-

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


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

Date: Thu, 21 Jan 1999 05:29:57 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <786e0d$o1a$1@nnrp1.dejanews.com>


>
> Anyway, it's supposed to be over.  Hitler has been invoked.
>

But I invoked Elvis, who cancels out Hitler.
Check the webicate rule book.


-tmind-

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


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

Date: Thu, 21 Jan 1999 05:36:49 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <786edh$o8d$1@nnrp1.dejanews.com>

In article <fl_aggie-2001991000310001@aggie.coaps.fsu.edu>,
  fl_aggie@thepentagon.com (I R A Aggie) wrote:
> In article <784oed$7os$1@nnrp1.dejanews.com>, droby@copyright.com wrote:
>
> + In article <783l0u$ajk$1@nnrp1.dejanews.com>,
> +   topmind@technologist.com wrote:
> + >
> + > Self policing does not work and managers are not trained
> + > or have no incentive on weeding out the cryptologists in
> + > a good many cases.
> + >
> +
> + You're saying we should change a programming language because some managers
> + don't feel an incentive to manage?
>
> I see...topmind is here to protect us from ourselves. Before long, he'll be
> working for the government, certifying programmers and languages that they
> comply with new government regulations.


You don't get it do you. You see this as a Cowboy vs. Gov issue.

The bottom line is what works best in a REAL EXISTING environment.

It is easier to introduce a new language than introduce
a new culture.

Nor am I an extremist on this issue. Actually I am in the middle
with Perlers at one end of the spectrum and OOP compiler lovers
at the other end.

You are the extremists, NOT ME!

"Fools to my left, jokers to my right, stuck in the middle with you"

La la la loo loo la la.


>
> James
>

-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/

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


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

Date: Wed, 20 Jan 1999 21:42:18 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl problem :(Offline mode...
Message-Id: <qm7687.feo.ln@magna.metronet.com>

Andrew Fry (andrewf@beausys.demon.co.uk) wrote:
: In article <36A626B6.948C9E72@mail.northgrum.com>, James M. Stern
: <sternji@mail.northgrum.com> writes
: >Herein, a gentle reply to a point of view that usually draws harsh ones.

: Gentle ? Perhaps. Patronising ? Certainly!

: >Andrew Fry wrote:
: >
: >> [... What module was prompting for "offline mode" values?] 
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: >> I am well aware of manuals, on-line docs, etc ... but I dont have
: >> time to plough through lots of manuals/docs (do you ???), 


   I have 10 minutes to try finding the answer. It might take close
   to that just to type up an article to post.


: >>and I
: >> know by experience that one doesnt always find what one is looking for
: >> in documentation.


   _Then_ you post.

   But you are expected to _look_ first.


: Just how much reading are you expecting me to do ???


   I don't see that he said "reading" anywhere.

   Where did you see that?

   There is a nifty programming language around that can be used
   to automate a word search.

   Let's use it to do a word search on all the modules installed
   on your system:


--------------------------
#!/usr/bin/perl -w
# module_grep - search for a word in all installed modules

use strict;
use File::Find;

die "USAGE: module_grep <word>\n" unless @ARGV == 1;

my $word = shift;
find(\&module_grep, @INC);


sub module_grep {
   my $line;

   return unless /\.pm$/;  # only interested in modules

   open(MODULE, $_) || die "could not open '$_' module  $!";
   while ($line = <MODULE>) {
      if ($line =~ /\Q$word/i) {
         $line =~ s/^\s+//;        # trim leading space
         print "$_: $line";
      }
   }
   close(MODULE);
}
--------------------------

module_grep offline

CGI.pm: # If neither is set, assume we're being debugged offline.
CGI.pm: print STDERR "(offline mode: enter name=value pairs on standard input)\n";
CGI.pm: # If $meth is not of GET, POST or HEAD, assume we're being debugged offline.
CGI.pm: print STDERR "(offline mode: enter name=value pairs on standard input)\n";
CGI.pm: # If $meth is not of GET, POST or HEAD, assume we're being debugged offline.
CGI.pm: print STDERR "(offline mode: enter name=value pairs on standard input)\n";
CGI.pm: # If neither is set, assume we're being debugged offline.
CGI.pm: print STDERR "(offline mode: enter name=value pairs on standard input)\n";


   Now I found out what module was prompting for "offline mode".

   Took me 10 minutes, 9 of those writing the script above, which
   I'll never have to do again.


: >> The fact is that I run a small comms/networking consultancy & software
: >> house ... and we work to very tight deadlines. Having the time to read
: >> and learn is something of a luxury.


   Whether you are busy or not has no bearing on what is
   interesting to the readers of this newsgroup.


: I am gradually getting to grips with the Perl documentation, and I
: realize the importance of documentation ... but I dont agree that
: reading documentation always saves time. 


   You read when you have time.

   You do word searches when you have an immediate problem
   to be solved.

   Sometimes it doesn't work, but many (most?) times it does.

   Get an answer in seconds instead of hours/days that you get
   with a Usenet post.

   You said you are always pressed for time. Seems like you ought
   to be motivated to use a time saver like online docs.


: Furthermore, it isnt reading documents per se that keeps my company
: in business. One can only spend so much time reading documentation!


   We are not here to help you keep your company in business.

   Asking us to read them for you is awfully pretentious.


: >By the way, I'll bet the regulars in this group are busier than you. 
: >People who read manuals usually are in demand to clean up after people
: >who don't.  :-)


   Rich, James  ;-)


: >> I appreciate the helpful replies, but frankly, I dont see the point in
: >> these discussion groups if the reply is just going to be 'read the
: >> manual'!


   Well then, let's share with you the point of these discussion groups.

   It is to discuss interesting Perl problems.

   Discussing problems that have already been solved is not interesting.

   Too much non-interesting stuff, and people stop reading the
   newsgroup.

   Used to be most of the Perl Porters and Larry himself in these
   here parts. 

   Precious little of that resource is available to us nowadays.

   Let's not drive off the remaining few by trying to get them
   to read the docs for us, else who will be left to answer
   our questions?


: I do read manuals. I'll wager a bet that I've read more ISO, ITU
: documents, RFCs, UNIX man pages, NT SDK documents, etc ... than you
: have.


   Then you can probably be sure that your postings to the ISO, ITU
   RFC, Unix, NT newsgroups will be interesting to the readers
   of those newsgroups.

   But we're not talking about those newsgroups.


: But please try not to be so bloody patronising. I have a degree in
: Computer Science, have run my own company for 15 years and have worked
: for some big companies (inc AT&T, X/Open, ICL) and on some big projects.
: I realize the importance of documentation and I know what my priorities
: are, thank you very much.


   I think you have made your priorities quite clear.

   It appears that you put your own interests above the interests
   of this community.

   That's OK. Usenet is anarchy. You can do whatever you want.

   But so can the folks that you want to use.


: I am a newcomer to this newsgroup ... but, frankly, I find these
: responses of 'read the manual' unhelpful. Why bother ?????


   Because you are pressed for time and folks want you to be
   able to get your answer more quickly?

   Because nobody is interested in problems that have been solved?

   Because we don't want you driving away the knowledgeable folks,
   we may need them someday?

   Because we don't want to do your work for you?


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


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

Date: Thu, 21 Jan 1999 04:46:55 GMT
From: David.A.Bradshaw@bridge.bellsouth.com (jm)
Subject: problems with IIS & mime types
Message-Id: <36aab0cf.15941228@news.bhm.bellsouth.net>

The generated web pages are housed on an NT server running IIS.
The application running on this box will ultimately need to pull files
down from a unix server in which filenames are case sensitive and
where NT is not.  

The problem is the mime type file does not take 2 entries for a
mime type.  I need for the mime type to take both lower and upper
case.  For example, application/msword has an extension of doc   I
want to also give it an extension of DOC.  I can not figure out how to
make 2 enties on the same line and when I try to add the DOC it says
the the extension already exist (must be looking at the lower case
entry).  I want IIS to launch word for both a filename that ends with
 .doc and a filename that ends with .DOC    Any help would be
appreciated.

Thanks


mailto:David.A.Bradshaw@bridge.bellsouth.com


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

Date: Wed, 20 Jan 1999 22:13:23 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Sorting Alphanumeric
Message-Id: <3h9687.feo.ln@magna.metronet.com>

x (ergowolf@mindspring.com) wrote:

: I have a feeling I am making a dumb mistake.


   Yep.

   Your dumb mistake is not enabling warnings.

   It generates a bunch of 'em.

   That would almost for sure helped you zero in on where
   your problem is.

   Enable warnings on *all* of your perl scripts.

   Really!

   All of them.




:             map  { [ $_, /([A-Za-z]+)(\d+)/ ] } @filelist;
                             ^^^^^^^^^^^^^^^


: item1 webcama_1.jpg
               ^
               ^ Q: which part of that regex will match this character?

A: none, so the match fails, so the anon array gets two values,
   with the second one being not too interesting (empty list).


   Stick an underscore in your character class.

   ;-)


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


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

Date: 21 Jan 1999 03:53:39 GMT
From: meowing@banet.net (Fluffy)
Subject: Re: Status of Threaded Perl
Message-Id: <7868bq$cva@meow.invalid>

lchang@alum.mit.edu <lchang@alum.mit.edu> wrote:
> I was wondering if anyone has any information on the status of threading
> support in Perl 5.005.  I noticed that the documentation indicates that it
> is
> an "experimental" feature.  Have people been using it successfully or does
> experimental really mean that it is very unreliable?  I am using Linux
> 2.0.36 and Perl 5.005_02.

It's not so much unreliable as unpredictable.  What works in one
release may or may not work the same way in the next.  If you're
willing to accept that a script will be tied to a particular perl
version, threads do work.  That's the price you pay for messing
with experimental features =)

If you want to play with threads, wait for the 5.005_03 release or grab
one of the prerelease copies for now.  _54 works but leaks memory
something fierce.
-- 
"Meow."  --me


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

Date: 21 Jan 1999 04:58:10 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Using GetOptions?
Message-Id: <786c52$ecm$1@towncrier.cc.monash.edu.au>

bobw@sr.hp.com (Bob Waltenspiel) writes:

>I want to allow my perl script to allow multiple instances of a
>particular option.  For instance, using my script 'lt':

>lt -s file1 -s file2 -l file3 -l file4

>I don't see how GetOptions as described in the O'Reilly books will
>allow this, so I'm looking for another suggestion.  Any help would be
>greatly appreciated.

Getopt::Declare (on the CPAN) will do this:

	use Getopt::Declare;

	$cmdline = Getopt::Declare->new q{
		-s <file>	The -s option [repeatable]
				{ push @s, $file }

		-l <file>	The -l option [repeatable]
				{ push @l, $file }
	};


HTH,

Damian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 name: Damian Conway                           addr: School of Computer Science
email: damian@csse.monash.edu.au                        and Software Engineering
  web: http://www.cs.monash.edu.au/~damian           Monash University
  fax: +61-3-9905-5146                               Clayton 3168, AUSTRALIA


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

Date: Wed, 20 Jan 1999 22:30:29 -0600
From: "Bradley J. Bell" <bradleyb@megsinet.net>
Subject: Re: write is trimming trailing blanks?
Message-Id: <36A6AD65.CCADA9F6@megsinet.net>

Robert,

you are probably trying the following....

format SOMETHING =
@>>>>@>>>>@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...> #340 padded R.J. chars
$a,$b,$x
 .

$a = '12345';
$b = '67890';
$x = ' ' x 340;
$~=SOMETHING;
write;

perhaps if you tried the following...

format SOMETHING =
@>>>>@>>>>
 ..@;  #339 actual spaces followed by a format field @
$a,$b,$x
 .

$a = '12345';
$b = '67890';
$x = ' ';
$~ = SOMETHING;
write;

Still kinda kludgy, better than the 'write a second file' solution I tried
this afternoon. .

Bradley

p.s. I tried it out on the train ride home tonight, seems to work. (we were
delayed 1 hour due to the engineer having a heart attact)

Robert Lang wrote:

> Hello.
>
> I'm having a bit of trouble with FORMAT and write.
>
> The records that we are writing must be 350 chars long.  (Padded with
> blanks.)
>
> No matter what I do, write seems to trim the blanks for me.  (Naughty,
> naughty, write.  I almost think that I'm using a Microsoft product.  ;-)
>
> I appreciate that fact that perl is trying to save space for me, but
> that is not what I want.
>
> Any help will be greatly appreciated.
>
> Regards,
>
> Robert Lang
> rrl@xnet.com



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

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

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