[8682] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2299 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 11 12:07:20 1998

Date: Sat, 11 Apr 98 09:00:22 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 11 Apr 1998     Volume: 8 Number: 2299

Today's topics:
        ANSI Colour in Perl (Karl Hanmore)
    Re: Bill Gates should be invited to O'Reilly's "Free So <ben@hayamasa.demon.co.uk>
    Re: Bill Gates should be invited to O'Reilly's "Free So <ben@hayamasa.demon.co.uk>
    Re: Bill Gates should be invited to O'Reilly's "Free So <ben@hayamasa.demon.co.uk>
    Re: Book: Perl Modules <fp@pmpcs.com>
    Re: Easy package/sub-routine ? <soccer@all-soccer.com>
    Re: General Rudeness, e.g. Re: Need a web login script <stackhou@execpc.com>
    Re: General Rudeness, e.g. Re: Need a web login script <sowmaster@juicepigs.com>
    Re: keys in hashs (M.J.T. Guy)
    Re: Numeric validation <ppp-support@canelle.telecom.uqam.ca>
    Re: Numeric validation (Jon Bell)
    Re: Perl Compiler for NT <grinch@whoville.com>
    Re: Perl Puzzle: How Many Contexts? (M.J.T. Guy)
    Re: question about Perl on Linux connecting to ODBC dat (Jim Michael)
        Reporting Module for Perl <fredg@idigital.net>
    Re: RMS should be invited to O'Reilly's "Free Software  <dpw@getsetgo.doc.ic.ac.uk>
    Re: RMS should be invited to O'Reilly's "Free Software  <xtifr@dsp.net>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 11 Apr 1998 11:42:30 GMT
From: avatar@ultra.net.au (Karl Hanmore)
Subject: ANSI Colour in Perl
Message-Id: <892294417.351756@terra.ultra.net.au>

G'Day,
	I was wondering if anyone knows of any code / modules for printing
 ANSI colour in Perl.  I have had a snoop through CPAN to no avail, and I
 really want to avoid re-inventing the wheel.   Anyone got any ideas? 
 If so, can you email me, as I rarely have time to read newsgroups :)

Regards,
	Karl




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

Date: Sat, 11 Apr 1998 13:40:09 +0100
From: Ben Bullock <ben@hayamasa.demon.co.uk>
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <352F64A9.4C393EC7@hayamasa.demon.co.uk>

Russ Allbery wrote:
> 
> In comp.lang.perl.misc, Ben Bullock <ben@hayamasa.demon.co.uk> writes:
> 
> > I should say that the perl FAQ does not meet several free software
> > criteria.
> 
> Starting with the really major problem that it's not software....

OK, it's not a computer program.  But it is a document in
machine-readable form.  The distributed Perl documents were offered as
examples of free documentation, but in the case of the Perl FAQ they
are not free.

Here is the licence condition for the Perl FAQ:

Noncommercial Reproduction                                          
 
   Permission is granted to distribute this document, in part or in
full,
   via electronic means or printed copy providing that (1) that all
   credits and copyright notices be retained, (2) that no charges beyond
   reproduction be involved, and (3) that a reasonable attempt be made
to
   use the most current version available.                           
 
   Furthermore, you may include this document in any distribution of the 

   full Perl source or binaries, in its verbatim documentation, or on a
   complete dump of the CPAN archive, providing that the three
   stipulations given above continue to be met.                       
 
     _________________________________________________________________ 
 
Commercial Reproduction                                                 
 
   Requests for all other distribution rights, including the
   incorporation in part or in full of this text or its code into     
   commercial products such as but not limited to books, magazine
   articles, or CD-ROMs, must be made to perlfaq-legal@perl.com. Any
   commercial use of any portion of this document without prior written
   authorization by its authors will be subject to appropriate action.   
 
     _________________________________________________________________  
 

Now, here is the definition of free software that I am using,
and some other information, from www.gnu.org:

You can read the original of this document at
``http://www.gnu.org/philosophy/categories.html''

%%%%%%%%%%%%%%%%%%% begin quoted material. 

Categories of Free and Non-Free Software

Here is a glossary of various categories of software that are often
mentioned in discussions of free software. It explains which
categories overlap or are part of other categories.  

Free software
     Free software is software that comes with permission for anyone to
use,
     copy, and distribute, either verbatim or with modifications, either
     gratis or for a fee. In particular, this means that source code
must be
     available. ``If it's not source, it's not software.''

     If a program is free, then it can potentially be included in a free
     operating system such as GNU, or free GNU/Linux systems .

     There are many different ways to make a program free---many
questions
     of detail, which could be decided in more than one way and still
make
     the program free. Some of the possible variations are described
below.

     Free software is a matter of freedom, not price. But proprietary
     software companies sometimes use the term ``free software'' to
refer to
     price. Sometimes they mean that you can obtain a binary copy at no
     charge; sometimes they mean that a copy is included on a computer
that
     you are buying. This has nothing to do with what we mean by free
     software in the GNU project.

     Because of this potential confusion, when a software company says
its
     product is free software, always check the actual distribution
terms to
     see whether users really have all the freedoms that free software
     implies. Sometimes it really is free software; sometimes it isn't.

     Many languages have two separate words for ``free'' as in freedom
and
     ``free'' as in zero price. For example, French has ``libre'' and
     ``gratuit''. English has a word ``gratis'' that refers
unambiguously to
     price, but no common adjective that refers unambiguously to
freedom.
     This is unfortunate, because such a word would be useful here.

     Free software is often more reliable than non-free software.

Open Source software 

The term ``open source'' software is used by some people to mean more
or less the same thing as free software. We prefer the term ``free
software'' ; follow that link to see the reasons.  Public domain
software

     Public domain software is software that is not copyrighted. It is a
     special case of non-copylefted free software, which means that some
     copies or modified versions may not be free at all.

     Sometimes people use the term ``public domain'' in a loose fashion
to
     mean ``free'' or ``available gratis.'' However, ``public domain''
is a
     legal term and means, precisely, ``not copyrighted''. For clarity,
we
     recommend using ``public domain'' for that meaning only, and using
     other terms to convey the other meanings.

Copylefted software
     Copylefted software is free software whose distribution terms do
not
     let redistributors add any additional restrictions when they
     redistribute or modify the software. This means that every copy of
the
     software, even if it has been modified, must be free software.

     In the GNU Project, we copyleft almost all the software we write,
     because our goal is to give every user the freedoms implied by the
term
     ``free software.'' See Copylefted for more explanation of how
copyleft
     works and why we use it.

     Copyleft is a general concept; to actually copyleft a program, you
need
     to use a specific set of distribution terms. There are many
possible
     ways to write copyleft distribution terms.

Non-copylefted free software
     Non-copylefted free software comes from the author with permission
to
     redistribute and modify, and also to add additional restrictions to
it.

     If a program is free but not copylefted, then some copies or
modified
     versions may not be free at all. A software company can compile the
     program, with or without modifications, and distribute the
executable
     file as a proprietary software product.

     The X Window System illustrates this. The X Consortium releases X11
     with distribution terms that make it non-copylefted free software.
If
     you wish, you can get a copy which has those distribution terms and
is
     free. However, there are non-free versions as well, and there are
     popular workstations and PC graphics boards for which non-free
versions
     are the only ones that work. If you are using this hardware, X11 is
not
     free software for you.

GPL-covered software
     The GNU GPL (General Public License) (20k characters) is one
specific
     set of distribution terms for copylefting a program. The GNU
Project
     uses it as the distribution terms for most GNU software.

The GNU system
     The GNU system is a complete free Unix-like operating system.

     A Unix-like operating system consists of many programs. We have
been
     accumulating components for this system since 1984; the first test
     release of a ``complete GNU system'' was in 1996. We hope that in a
     year or so this system will be mature enough to recommend it for
     ordinary users.

     The GNU system includes all the GNU software, as well as many other
     packages such as the X Window System and TeX which are not GNU
     software.

     Since the purpose of GNU is to be free, every single component in
the
     GNU system has to be free software. They don't all have to be
     copylefted, however; any kind of free software is legally suitable
to
     include if it helps meet technical goals. We can and do use
     non-copylefted free software such as the X Window System.

GNU software
     GNU software is software that is released under the auspices of the
GNU
     Project. Most GNU software is copylefted, but not all; however, all
GNU
     software must be free software.

     Some GNU software is written by staff of the Free Software
Foundation,
     but most GNU software is contributed by volunteers. Some
contributed
     software is copyrighted by the Free Software Foundation; some is
     copyrighted by the contributors who wrote it.

Semi-free software
     Semi-free software is software that is not free, but comes with
     permission for individuals to use, copy, distribute, and modify
     (including distribution of modified versions) for non-profit
purposes.
     PGP is an example of a semi-free program.

     Semi-free software is much better than proprietary software, but it
     still poses problems, and we cannot use it in a free operating
system.

     The restrictions of copyleft are designed to protect the essential
     freedoms for all users. For us, the only justification for any
     substantive restriction on using a program is to prevent other
people
     from adding other restrictions. Semi-free programs have additional
     restrictions, motivated by purely selfish goals.

     It is impossible to include semi-free software in a free operating
     system. This is because the distribution terms for the operating
system
     as a whole are the conjunction of the distribution terms for all
the
     programs in it. Adding one semi-free program to the system would
make
     the system as a whole just semi-free. There are two reasons we do
not
     want that to happen:

        o We believe that free software should be for
everyone--including
          businesses, not just schools and hobbyists. We want to invite
          business to use the whole GNU system, and therefore we must
not
          include a semi-free program in it.

        o Commercial distribution of free operating systems, including
          Linux-based GNU systems, is very important, and users
appreciate
          being able to buy commercial CD-ROM distributions. Including
one
          semi-free program in an operating system would cut off
commercial
          CD-ROM distribution for it.

     The Free Software Foundation itself is non-commercial, and
therefore we
     would be legally permitted to use a semi-free program
``internally''.
     But we don't do that, because that would undermine our efforts to
     obtain a program which we could also include in GNU.

     If there is a job that needs doing with software, then until we
have a
     free program to do the job, the GNU system has a gap. We have to
tell
     volunteers, ``We don't have a program yet to do this job in GNU, so
we
     hope you will write one.'' If we ourselves used a semi-free program
to
     do the job, that would undermine what we say; it would take away
the
     impetus (on us, and on others who might listen to our views) to
write a
     free replacement. So we don't do that.

Proprietary software
     Proprietary software is software that is not free or semi-free. Its
     use, redistribution or modification is prohibited, or requires you
to
     ask for permission, or is restricted so much that you effectively
can't
     do it freely.

     The Free Software Foundation follows the rule that we cannot
install
     any proprietary program on our computers except temporarily for the
     specific purpose of writing a free replacement for that very
program.
     Aside from that, we feel there is no possible excuse for installing
a
     proprietary program.

     For example, we felt justified in installing Unix on our computer
in
     the 1980s, because we were using it to write a free replacement for
     Unix. If we were not working on that project, we would have
considered
     it off limits to install Unix. Nowadays, since free operating
systems
     are available, the excuse is no longer applicable; we have
eliminated
     all our non-free operating systems, and any new computer we install
     must run a completely free operating system.

     We don't insist that users of GNU, or contributors to GNU, have to
live
     by this rule. It is a rule we made for ourselves. But we hope you
will
     decide to follow it too.

Shareware
     Shareware is software which comes with permission for people to
     redistribute copies, but says that anyone who continues to use a
copy
     is required to pay a license fee.

     Shareware is not free software, or even semi-free. There are two
     reasons it is not:

        o For most shareware, source code is not available; thus, you
cannot
          modify the program at all.

        o Shareware does not come with permission to make a copy and
install
          it without paying a license fee, not even for individuals
engaging
          in nonprofit activity. (In practice, people often disregard
the
          distribution terms and do this anyway, but the terms don't
permit
          it.)

Commercial Software
     Commercial software is software being developed by a business which
     aims to make money from the use of the software. Most commercial
     software is proprietary, and many people treat the two as
synonymous.
     But that is a mistake: proprietary software is not always
commercial,
     and free software can be commercial.

     For example, GNU Ada is always distributed under the terms of the
GNU
     GPL, and every copy is free software; but its developers sell
support
     contracts. When their salesmen speak to prospective customers,
     sometimes the customers say, ``We would feel safer with a
commercial
     compiler.'' The salesmen reply, ``GNU Ada is a commercial compiler;
it
     happens to be free software.''

     For the GNU Project, the emphasis is in the other order: the
important
     thing is that GNU Ada is free software; whether it is commercial
does
     not directly matter. However, the additional development of GNU Ada
     that results from this commerce is definitely beneficial.


----------------------------------------------------------------------------
Return to GNU's home page.

FSF & GNU inquiries & questions to gnu@gnu.org. Other ways to contact
the
FSF.

Comments on these web pages to webmasters@www.gnu.org, send other
questions
to gnu@gnu.org.

Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111, USA

Verbatim copying and distribution is permitted in any medium, provided
this
notice is preserved.

Updated: 13 Mar 1998 rms
----------------------------------------------------------------------------

%%%%%%%%%%% end quoted material.

So the Perl FAQ doesn't fit into the category of being `free' that I
am using.  You might like to notice that the reason I pointed that
it's not free out was because someone said that it was.  Maybe this
discussion would be more intelligent if people bothered to read the
whole thread, or even the whole of one of my messages.  [[Maybe a
minority of people in this discussion would prefer it wasn't
intelligent debate but a slanging match since bullying and abuse might
give them a chance of winning this debate without having to resort to
tedious things like logic and honesty.]]

Do you understand my point of view now?

I am prepared to argue with people who disagree with me but I don't
think it is useful to keep arguing with people when talking at cross
purposes or using different definitions of words.

-- 
Ben Bullock


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

Date: Sat, 11 Apr 1998 13:49:23 +0100
From: Ben Bullock <ben@hayamasa.demon.co.uk>
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <352F66D3.30F513B8@hayamasa.demon.co.uk>

Russ Allbery wrote:

> You just switched from source code to documentation. 

No, I started this whole discussion about documentation.  I brought
the software argument in as a sideline (O'Reilly is a proprietory
software company, for example they sell a WWW server.)
  

> The FSF prints manuals from
> their info pages and sells them, and I've never heard anyone complaining
> they're taking free documentation and making it proprietary.

That's because they aren't.  You could freely take a manual
that the FSF produced and photocopy it and then sell the photocopies
for a fee.

The FSF even encourages you to photocopy their T-shirts for
example.  

> If this is X documentation, presumably it was originally released under
> the standard X license, which means the documentation is still free.

I pointed this out in the first post on this thread.  It's a little
boring to re-post it here.

-- 
Ben Bullock


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

Date: Sat, 11 Apr 1998 14:01:10 +0100
From: Ben Bullock <ben@hayamasa.demon.co.uk>
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <352F6996.6FDE5A4B@hayamasa.demon.co.uk>

Russ Allbery wrote:

> I submit that having a book written about it, particularly a book by a
> company with the profile of O'Reilly, legitimizes a free software package
> in corporate eyes, and that lack of perceived legitimacy is one of the
> biggest barriers to the general acceptance of free software.  Perl, which
> is most certainly free software by any definition, has benefited greatly
> by being heavily documented both in the distribution *and* in print.

You have a point that having good
proprietory documentation will increase the possibility
of people using free software: I think that the freedom
issue is important enough that it would be better to reject
proprietory documentation


> Furthermore, taking into account that O'Reilly is paying Larry Wall to
> work on, among other things, free software products, and after listening
> to both Larry and Tim O'Reilly discuss the subject at the last Perl
> Conference, I think that O'Reilly's corporate direction is definitely in
> favor of free software.

If you look at the O'Reilly web page which sparked this discussion,
you will see that they are mostly in favour of free software that
they have books published about, i.e. Sendmail, Perl, and Bind,
as well as Apache which competes with their NON-free WWW server.
 
See ``http://webreview.com/wr/pub/freeware/oreilly.html''

As for paying Larry Wall, they paid him also to make proprietory
software for them as well as proprietory books.

> 
> I don't think that O'Reilly is a free software company.  I do think that
> it's a *pro*-free software company.  Or at least one very sympathetic to
> the concept.

I don't: I think the difference between us is the different
understanding of the concept of `free' in `free software'.  I think
having proprietory documentation dilutes the `free' part.
Free software should have free documentation, otherwise it's
proprietory software by the back door.  I also think that O'Reilly
is anti-free software in that they have turned parts of
it proprietory for their own benefit.

-- 
Ben Bullock


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

Date: Sat, 11 Apr 1998 09:02:48 -0400
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Re: Book: Perl Modules
Message-Id: <6gnpnh$6c4$1@usenet47.supernews.com>

Greetings Chris:

Chris Winters wrote in message <352f88d6.593357132@news.cais.com>...
>Has anyone checked out the book _Perl Modules_ by Eric Foster Johnson?
>Amazon says it was published in March and that:

I bought the book (from Amazon.com).  While it is still worth it, it does
not cover a lot of modules and the coverage examples are short and not as
many as I would have liked to see.

--
===========================================================
Peter Perchansky,  Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, &  Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.msfrontpage.net/





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

Date: Sat, 11 Apr 1998 09:05:04 -0400
From: Geoffrey Hebert <soccer@all-soccer.com>
To: WS010 <WS010@dvvlap.be>
Subject: Re: Easy package/sub-routine ?
Message-Id: <352F6A80.C3B56422@all-soccer.com>

Thanks, I got it to work.

It took three changes.

1.  wrote a script to read my script and remove cr's.
     Everything else works for me without it, but this seems to need it.

2.  added 1; in TestLib both at the end of the sub-routine and again at
the end of the file.
3.  changed the call to the sub-routine from &sub2 to Testlib::sub2

I now have a simple example that works.  I guess I am a simpleton, I
like to have simple examples to view.  You would think that what I am
trying to accomplish is common and there would be samples everywhere.  I
spent hours looking for examples.

I read chapter 5 in Programming Perl twice, but there was no example of
both the parent and child working together.  If it was there, I could
not grasp it with the language that was written.

Thanks.
WS010 wrote:

> Try appending the following line to your .pm file anyway.
> 1;



--
FREE   FREE   FREE   FREE

Free site for your Soccer League

http://www.all-soccer.com

All about soccer - what else is there!




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

Date: Sat, 11 Apr 1998 09:09:51 -0500
From: Mark Stackhouse <stackhou@execpc.com>
Subject: Re: General Rudeness, e.g. Re: Need a web login script
Message-Id: <6gnts1$l7u@newsops.execpc.com>

Well, here we go AGAIN!!!  It's a d*mn good thing you can't get a bloody nose from a
monitor.

--
Mark Stackhouse

***********************************************************************

homepage: http://www.execpc.com/~stackhou

"The best things in life aren't things."
--Art Buchwald

***********************************************************************


Michael J Gebis wrote:
> 
> tmornini@netcom.com (Tom Mornini) writes:
> }sonny (sonny@88net.net) wrote:
> }: Do you think that being rude to people who post questions that you deem
> }: aren't worthy will deter others from doing so?  All this invective just adds
> }: to the general noise.  Ignore them, tell them to RTFM, or give'm an URL, but
> }: this "its my playground" attitude is really childish.
> 
> }It does amaze me how some people, who understand everything technical,
> }understand so little socially.
> 
> }In other words, I completely agree.
> 
> }The "protectors of the group" need a crash course in leadership by example.
> 
> I couldn't help but notice that both of you also failed to answer the
> question.
> 
> --
> Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Sat, 11 Apr 1998 10:30:41 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
Subject: Re: General Rudeness, e.g. Re: Need a web login script
Message-Id: <352F7E91.6F25@juicepigs.com>

Mark Stackhouse wrote:
> 
> Well, here we go AGAIN!!!  It's a d*mn good thing you can't get a bloody nose from a
> monitor.


You can if you pick your nose too much while reading.

-- 
Bob Trieger               |  Titanic: big boat, bigger
sowmaster@juicepigs.com   |           iceberg, big deal


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

Date: 11 Apr 1998 15:03:40 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: keys in hashs
Message-Id: <6go0oc$84t$1@lyra.csx.cam.ac.uk>

In article <352E5D1D.AE99C308@hpl.hp.com>, Larry Rosler  <lr@hpl.hp.com> wrote:
>Mark-Jason Dominus wrote:
>> Wrong.  They are identical.  Try
>> 
>>         $myhash{time}
>> 
>> and see what it does.  Does it get the time?  Nope.
>
>But it *does* get a warning from the "-w" flag.  So in that sense, they
>are not identical.

But that is considered to be a bug.   The warning will not occur in
Perl 5.004_05.


Mike Guy


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

Date: Sat, 11 Apr 1998 14:38:27 GMT
From: ppp-support <ppp-support@canelle.telecom.uqam.ca>
Subject: Re: Numeric validation
Message-Id: <352F7F50.358CE5F9@canelle.telecom.uqam.ca>

Someone gave me the right answer by Email, he's answer is:

if ($num =~ /^[0-9]+$/)
{
        # It's a numeric and numeric only
}
else
{
        # It's something more than numeric
}

Abigail wrote:

> ppp-support (ppp-support@canelle.telecom.uqam.ca) wrote on MDCLXXXIV
> September MCMXCIII in <URL: news:352EC5DE.4C57C6C3@canelle.telecom.uqam.ca>:
> ++ Because I dont understand the FAQ!! Thats why i post here.
>
> Then say so. And say what you don't understand. Else you will get
> flamed, or get the faq quoted to you....
>
> ++ Well, how do i use this stuff, if i want to check if the content of $num is
> ++ or not numeric. Call me stupid if you want, but i will still dont get it :-)
> ++
> ++ The faq4 say...
> ++    warn "has nondigits"        if     /\D/;
> ++    warn "not a whole number"   unless /^\d+$/;
> ++    warn "not an integer"       unless /^-?\d+$/;  # reject +3
> ++    warn "not an integer"       unless /^[+-]?\d+$/;
> ++    warn "not a decimal number" unless /^-?\d+\.?\d*$/;  # rejects .2
> ++    warn "not a decimal number" unless /^-?(?:\d+(?:\.\d*)?|\.\d+)$/;
> ++    warn "not a C float"
> ++        unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;
>
> Well, could you be more specific about what you don't understand?
>
> Abigail
> --
> perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'

 Reni




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

Date: Sat, 11 Apr 1998 15:03:54 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Numeric validation
Message-Id: <Er98II.AxH@presby.edu>

 ppp-support  <ppp-support@canelle.telecom.uqam.ca> wrote:
>Because I dont understand the FAQ!! Thats why i post here.
>Well, how do i use this stuff, if i want to check if the content of $num is
>or not numeric. Call me stupid if you want, but i will still dont get it :-)
>
>The faq4 say...
>   warn "has nondigits"        if     /\D/;
>   warn "not a whole number"   unless /^\d+$/;
>   warn "not an integer"       unless /^-?\d+$/;  # reject +3
>   warn "not an integer"       unless /^[+-]?\d+$/;
>   warn "not a decimal number" unless /^-?\d+\.?\d*$/;  # rejects .2
>   warn "not a decimal number" unless /^-?(?:\d+(?:\.\d*)?|\.\d+)$/;
>   warn "not a C float"
>       unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;

Each one of the "warn" lines is a Perl statement.  Pick one that applies
to your situation, copy it, and paste it into your script.

-- 
Jon Bell <jtbell@presby.edu>


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

Date: Sat, 11 Apr 1998 10:52:31 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: Perl Compiler for NT
Message-Id: <6gnv96$br@fridge.shore.net>

Abigail wrote in message <6gmksk$23d$4@client3.news.psi.net>...

>Not in the normal sense of "interpretor".


On the other paw, it's not really a compiler in the normal sense of the
word, either, because it doesn't produce hardware-specific machine code.
Even the actual Perl "compiler" produces either C code, which is then
compiled with another program, or Perl bytecodes, which are then interpreted
by perl.

I choose to use the term "interpreter" because it comes closest to
describing how perl works internally. The bytecodes used internally do not
have a 1:1 correspondence to any machine language instructions with which I
am familiar. Therefore, the bytecodes are being interpreted, and I choose to
describe perl as an interpreter.

It's unfortunate that the term "interpreter" carries such a heavy negative
connotation of slow performance, as a result of the relatively poor
performance of such programs in the past. It's unfortunate because, as
Abigail has pointed out, perl is not really the same sort of interpreter.

Maybe we need a new word? How about "perler?" Obviously, a "perler," would
be a program that perls, and "perling" would be the act of executing a Perl
script. Or is that a Perl program... damn...   :-)

-grinch

--
"Of course coffee doesn't make the world go around. It
just makes it go faster." - me

Sherm Pendley
grinch@whoville.com
http://www.whoville.com





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

Date: 11 Apr 1998 15:18:56 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Perl Puzzle: How Many Contexts?
Message-Id: <6go1l0$8df$1@lyra.csx.cam.ac.uk>

In article <6glci5$1ir$1@monet.op.net>, Mark-Jason Dominus <mjd@op.net> wrote:
>I've been trying to make a list of contexts; not all are
>distinguishable by `wantarray'.  The manual notwithstanding, there's
>not really any such thing as `boolean' context; that's just a figure
>of speech.  But there are at least two other contexts in Perl.

I think you're asking the wrong question.   'context' merely refers to
the environment in which a Perl expression is evaluated.     So there are
as many contexts as there are expressions within Perl programs.

Certain categories of context are given special names.   In particular,
we can say:

i)   Every context is either a list context or a scalar context.

ii)  Certain scalar contexts are distinguished as void, boolean,
     numeric or string contexts.   But these are all special cases of
     scalar contexts.


Mike Guy


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

Date: Sat, 11 Apr 1998 15:00:17 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: question about Perl on Linux connecting to ODBC database on NT
Message-Id: <genepoolEr98CH.DsL@netcom.com>

Charles Ragan (raganNOSPAM@idetix.com) wrote:

: I have downloaded (read the readme's and FAQ's) and installed the DBI module 
: on the Linux box. I also downloaded the DBD::ODBC module, or driver as it is 
: called but the readme for the module is confusing in the sense that it askes 
: for the location of where the "driver manager" is installed (a directory 
: path). The documentation for the modules make no mention of what the "driver 
: manager" is or where it can be found. I assumed the driver manager was the 
: DBD::ODBC module itself, but why would the install script ask for where it is 
: already installed?

On a Win32 box your ODBC manager is used to set up the client side, you 
enter the database path (name) and machine (or IP address). I haven't heard
of such for Linux. 

: Even when I do get the ODBC driver installed and working, is it possible to 
: make ODBC calls across TCP/IP with these modules to another machine?

Yes, that is how it usually works, you have client and server pieces to 
your ODBC driver and they talk over tcp/ip.

Have you looked into using DBD/DBI for your Sybase installation? You 
might check CPAN for a DBI for Sybase. 

Cheers,

Jim


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

Date: Sat, 11 Apr 1998 22:38:33 -0400
From: Fred Gonsalves <fredg@idigital.net>
Subject: Reporting Module for Perl
Message-Id: <35302929.82851459@idigital.net>

Is there any PERL Module that will do reports??????
ie. do a page break when the branch id changes and display the header
     also put a total footer on the previous page.

We are an AIX shop and use JAM to the reports. It is very slow is
actually
producing the reports.

    Thanks !!!



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

Date: 10 Apr 1998 23:31:14 +0000
From: David Wragg <dpw@getsetgo.doc.ic.ac.uk>
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <y7rg1jlqmnx.fsf@getsetgo.doc.ic.ac.uk>

tzs@halcyon.com (Tim Smith) writes:
> But if you want to share without strings attached, don't use GPL.
> When I feel like giving something of mine as a gift to other programers,
> I want it to really be like a gift.
> 
> Placing something in the public domain, or using a license with very
> few restrictions, is like giving someone cash for their birthday.  They
> get to decide exactly how they want to use it.  Placing something under
> GPL is like giving someone a gift certificate for "Underwear R Us"
> for their birthday.

I would say it is more like standing on a street corner handing out
"Underwear R Us" gift vouchers. Only the people who shop at that store
(or might decide to shop at that store) will want them. Which is the
whole point.

Which would make the BSD like standing on a street corner handing out
cash.

--
Dave Wragg



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

Date: 11 Apr 1998 04:37:33 -0700
From: Chris Waters <xtifr@dsp.net>
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <87zphsbncy.fsf@dsp.net>

tzs@halcyon.com (Tim Smith) writes:

> Placing something in the public domain, or using a license with very
> few restrictions, is like giving someone cash for their birthday.  They
> get to decide exactly how they want to use it.  Placing something under
> GPL is like giving someone a gift certificate for "Underwear R Us"
> for their birthday.

That's a really bad analogy.  PD and BSD/X licenses are like giving
your code away to the world.  The GPL is like sharing it with the
world.  People who don't like to share are most likely to complain
about the GPL.  People who use BSD/X licenses are welcome to brag that
they're more generous -- they are -- but for them to claim that people
who only share are not being generous enough, when most
people/companies don't *even* share their code, seems a little
extreme.  Especially since the *only* people who are really hurt by
the GPL's requirement to share are people who don't want to share.
-- 
Chris Waters   xtifr@dsp.net | I have a truly elegant proof of the
or   cwaters@systems.DHL.COM | above, but it is too long to fit into
http://www.dsp.net/xtifr     | this .signature file.


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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

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