[8954] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2573 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 12 19:10:02 1998

Date: Tue, 12 May 98 16:02:00 -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           Tue, 12 May 1998     Volume: 8 Number: 2573

Today's topics:
    Re: Learning Perl vs Programming Perl (Books) (Paul Medynski)
        Newbie needs help! <vincent@psnw.com>
    Re: NEWSFLASH: NUCLEAR war erupts??!! World WAR 3 begin (David Annis)
        Nuclear bombing of NEW YORK! Small countries can target <gdw@yahoo.com>
    Re: Nuclear bombing of NEW YORK! Small countries can ta <jdf@pobox.com>
    Re: Perl for Non-programmers (was Re: Does Perl have a  <p-ciccone@usa.net>
    Re: Perl for Non-programmers (was Re: Does Perl have a  (Mark Maurer)
    Re: Randomly sorting an array <danboo@negia.net>
    Re: regexp for strings of chars (Tad McClellan)
    Re: regexp for strings of chars (Craig Berry)
    Re: RTFM <andrewf@cp.pathfinder.com>
    Re: Scanning Perl scripts for Y2K problems (Stuart McDow)
    Re: Set Difference Problem! <due@murray.fordham.edu>
    Re: Set Difference Problem! <due@murray.fordham.edu>
    Re: Significant digit? (John Stanley)
    Re: Significant digit? (brian d foy)
    Re: Significant digit? (Craig Berry)
    Re: Tip: Filehandles (Kevin Reid)
    Re: Tip: Filehandles <tchrist@mox.perl.com>
    Re: Tip: Filehandles <upsetter@shore.net>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 12 May 1998 18:41:00 GMT
From: paulm@rc.gc.ca (Paul Medynski)
Subject: Re: Learning Perl vs Programming Perl (Books)
Message-Id: <3558964e.339841033@nntp.rc.gc.ca>

>Treeskunk wrote:
>
>> I'm a programmer and am interested in both of these books. I would like to get Learning because it talks about CGI. However, I would like to get Programming because I feel it is probably more for programmers. Any suggestions? Is the information from the CGI chapter in Learning available anywhere else (on the net) so if I get Programming I will not miss anything?
>
>Hi there. I'm myselfe learning PERL these days. Beeing a solid programmer on the Amiga platform (non object oriented languages though), I knew the general rules in programig. I decided to start solely with "Learning PERL" (the Llama book). I must say that it did not take long until I was missing something. When I got "Programming PERL" (Camel book) a week later it
>was such a releif. In my opinion a lot of things are easier to learn from the latter book. I guess  that if you buy both you will have a very complete litterature. If you will only buy one of the books, then go for "Programing PERL" (Camel). I also know that experienced programmers might find "learning PERL" a bit too simple. There is also a special CGI book called
>"CGI Programming on the world wide web" from the same publisher. This book is written for CGI programing in PERL. Good luck.
>
>Hauk Langlo (JAPH)

	If you're really intending to program Perl, then another
O'Reilly book, 'Advanced Perl Programmingl' might be of interest to
you.  I'm looking at the Learning book right now and it basically
gives you insight into how Perl works and interacts with th OS.  It's
not a bad place to start, but I think reading all of it might be a bit
tedious.  The Programming book is great (especially the section that
explains all Perl's functions)  It's good reference and reading.  The
Advanced book delves deep into the hardcore stuff, but is still
readable.  So I guess my advice is to assess your personal needs and
level of previous experience / skill.  The books are approppriately
titled, so buy the one that fits you.

Paul Medynski



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

Date: Tue, 12 May 1998 15:26:37 -0700
From: Mitch O'Brien <vincent@psnw.com>
Subject: Newbie needs help!
Message-Id: <3558CC9C.8DC1BF19@psnw.com>

I'm a Professor of Psychology and have started getting interested in
Perl.  Unfortunately I don't have the time to figure out the script that
I need to use for my students to submit there papers.  If anyone can
help I'd appreciate it.  It seems easy, it's just that I haven't gotten
deep enough into Perl to figure out how to do it.  Any help is
appreciated.

Here's what I want to do:  I've set up a file:

148:1
0 0 18 20 2 1998
/home/vincent/148/proj4/148.1
/home/vincent/148/proj4/148.1/late
148:2
0 0 18 3 4 1998
/home/vincent/148/proj4/148.2
/home/vincent/148/proj4/148.2/late
148:3
0 0 18 13 5 1998
/home/vincent/148/proj4/148.2
/home/vincent/148/proj4/148.2/late

where the first line is the assignment number, line two is the seconds,
minutes, hours, days, month and year of when the assignment should be
turned in.  Line three is the directories of where I will copy the files
into.

Here's what the program should do:  the student would type something
like 'submit 148:1 file1 file2 ...'  The program would then ask for the
student SSN and then the program would check if assignment number
entered '148:1' is in the file listed above.  If it is, it then checks
the current date upon submission with the acceptable submission time
listed in the file above and if it is before that time it then copies it
into the directories given with something like 'SSN.file1' 'SSN.file2'
etc., if it is late it copies it into the late directory.

I've got the first couple parts done, but I'm having trouble with the
data validation and copying of files.  I'm running out of time for this
script to be ready and so I'm asking if anyone can help?

Thanks again, Mitch.



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

Date: Tue, 12 May 1998 20:53:43 GMT
From: dave.annis@kohlerco.com (David Annis)
Subject: Re: NEWSFLASH: NUCLEAR war erupts??!! World WAR 3 begins??!!!
Message-Id: <355bb694.1839634534@news1.norlight.net>

On Mon, 11 May 1998 19:08:16 +0000, nuke <nuketest@yahoo.com> wrote:

	<snip some really bizarre ranting>

Full moon on May 11.
***************************************************************
** Dave Annis            *  With age comes wisdom,           ** 
** Kohler Co.            *  if you stay awake along the way. **
***************************************************************


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

Date: Tue, 12 May 1998 17:28:57 -0500
From: gdw <gdw@yahoo.com>
Subject: Nuclear bombing of NEW YORK! Small countries can target with nukes!
Message-Id: <3558CD29.12CB@yahoo.com>

It may be a BIG SURPRISE nuclear attack by a very small country like
Iran,
Cuba, Iraq, Jordan, Egypt, North Korea, etc.. on big U.S cities!!
Read on for more...

On monday May 11, India conducted nuclear blast tests of 3 types of
nuclear bombs. They are -
1. Fission bomb - Uranium based bomb (plutonium...)
2. Fusion bomb - Hydrogen bomb (Thermo-nuclear bomb)
3. New type of bomb - Global Destruction Bomb (Nuclear weapon NOT USING
any 
   uranium or plutonium or any of the light atoms like 
   hydrogen, helium, etc...!!)

At rajasthan desert The energy output from item (1) above was approx
same as 1974 test.
energy output from item(2) was very high 
and energy output from item(3) was less than item(1).

http://dailynews.yahoo.com/headlines/top_stories/       
	title is 'India critized for nuclear tests'
http://dailynews.yahoo.com/headlines/top_stories/story.html?s=z/reuters/980511/news/stories/india_3.html

Hearty congrajulations to Indian scientists/engineers!!
Indian scientists did a great job in developing advanced nuclear bombs.
INDIA is the FIRST NATION in the WORLD to develop a new type 
of nuclear bomb which DOES NOT use uranium/plutonium derivatives.

Third type of bomb item(3) WILL have immense capability, which will be
smaller than
a wrist-watch battery but will have IMMENSE scalability!! The message is
-
"INDIA had developed GLOBAL Destruction weapon". What it means that -
"Planet EARTH is NOT ONLY a HUGE bar magnet BUT also is a HUGE ATOM
BOMB!!"

US intelligence was caught by surprise and they never knew the event
even after
10 hours after the test!

Great significance is that nations around the world NEED NOT build a
nuclear
reactor AT ALL to build this new type of nuclear bomb!!
It means that very small countries like Taiwan, Sri Lanka, Iraq, Iran,
Pakistan,
New Zealand can make nuclear bomb which will NOT USE any derivatives of 
Uranium or Plutonium, in a very SMALL ROOM completely unknown to
western powers!! Small countries DO NOT NEED to build nuclear reactors
AT all to build
nuclear bombs!! The successful test of item(3) is a GOOD NEWS for many
small countries in the world!!

The new type of bomb is very tiny and can be easily flown into U.S.A  or
european
cities using their Immigration doors, F-1 Student visas, H1 work visas,
Tourist visas, 
U.S. Green cards, US citizenships and than be detonated!! It does not
need 
any missile at all!
U.S must be very alert and stand guard against small countries with whom
it is 
going in war like Iraq (currently), Iran, Jordan, Syria, Cuba, Egypt
etc...
U.S. must keep an eye on third world countries. U.S does not have any
threat from
big powers like China, Russia, UK, France, India but from tiny unstable
countries.

You are living, sleeping and walking on a planet which is a 
LIVE ATOM BOMB and a HUGE BAR MAGNET!!

If someone were to drop tiny-size item(3) bomb on pacific ocean, the
entire globe
will detonate and earth will be completely vaporised and will be
eliminated from the
solar system!!

Understand the magic is that MASS and ENERGY are ONE and THE SAME
ENTITY!!
MASS can be easily converted into energy and ENERGY can be easily
converted into 
MASS!! The eqn is E=m*c*c  c=speed of light m=mass and E=energy!


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

Date: 12 May 1998 18:55:29 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Nuclear bombing of NEW YORK! Small countries can target with nukes!
Message-Id: <btt3doy6.fsf@mailhost.panix.com>

gdw <gdw@yahoo.com> writes:

> Understand the magic is that MASS and ENERGY are ONE and THE SAME
> ENTITY!!  MASS can be easily converted into energy and ENERGY can be
> easily converted into MASS!! The eqn is E=m*c*c c=speed of light
> m=mass and E=energy!

Did this remind anyone else of the stuff that's printed on those
wonderful Dr. Bronner's Essene soap bottles?

   9th: More good is caused by evil than by good, do what's right!
   Enlarge the positive! Replace the negative with the Moral ABC of
   All-One-God-Faith that lightning-like unites the Human race! For we're
   All-One or none! As Mao found in Redbook '51, "Marxism once in power,
   is unworkable! Has less value than cow dung! Its power is the gun!"
   Khruschev added, "Without profits, farmers won't deliver food, we
   starve!"

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


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

Date: 12 May 1998 13:59:21 -0700
From: Paolo Ciccone <p-ciccone@usa.net>
Subject: Re: Perl for Non-programmers (was Re: Does Perl have a IDE?I don't like command line.
Message-Id: <wk1ztztdcm.fsf@usa.net>

>>>>> "MC" == Mark Maurer <mwmaurer@mtu.edu> writes:

    MC> To this I would have to say -- "No kidding." 

:)


    MC> I think it could be wise to throw Perl in with C as a language
    MC> NOT to teach to an aspiring programmer first...

Well, I disagree. The way Perl allows to program by incrementally
learning more features and the fact that it doesn't need the usual
edit/compile/link/run cicle makes it a very good, IMHO, language for
the aspiring programmer. The problem could be that he/she will get so
spoiled to not learn any other language :)

--Paolo



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

Date: 12 May 1998 18:05:17 -0400
From: mwmaurer@mtu.edu (Mark Maurer)
Subject: Re: Perl for Non-programmers (was Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jah2t$o2o$1@pace1.cts.mtu.edu>

Paolo Ciccone (p-ciccone@usa.net) wrote:
: >>>>> "MC" == Mark Maurer <mwmaurer@mtu.edu> writes:
: 
:     MC> To this I would have to say -- "No kidding." 
: 
: :)
: 
: 
:     MC> I think it could be wise to throw Perl in with C as a language
:     MC> NOT to teach to an aspiring programmer first...

MC?  Oh well... ;)

: Well, I disagree. The way Perl allows to program by incrementally
: learning more features and the fact that it doesn't need the usual
: edit/compile/link/run cicle makes it a very good, IMHO, language for
: the aspiring programmer. The problem could be that he/she will get so
: spoiled to not learn any other language :)

Most languages will allow you to incrementally learn new features.  Just some
are better at it than others.  C, C++, and Java (the last two are very much
CS weenie languages, IMHO) are some languages that just aren't conducive to
trying to teach an aspiring programmer programming.  I throw Perl in there,
because people very easily slip into "hacker" mode with it and start to rely
on tips and tricks, and may NEVER learn a) the correct way or b) why it works
in the first place.

And while your edit|compile|link|run cycle gets put down to basically
edit|run, that is the very argument that the CS dept up here uses to when
they teach Scheme, a language that very well deserves a slow, painful death.

Of course, as Tom C. said earlier, it is pretty much all in how you teach it.
That means that we need to get Profs or Grad students that can program, and
not just do algorithims... :) (just a big complaint up here...)

-- 
Mark Maurer  markm@dct.com                      mwmaurer@mtu.edu
Programmer,  Digital Magic Interactive          http://www.dminteractive.com
Senior,      Michigan Technological University  Houghton, MI
-- Views do not represent those of my employer or school


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

Date: Tue, 12 May 1998 17:19:49 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Randomly sorting an array
Message-Id: <3558BCF5.9841F60A@negia.net>

Chip Salzenberg wrote:
> 
> Tom Phoenix  <rootbeer@teleport.com> wrote:
> >    sub shuffle {
> >       # returns a random shuffle of a given list
> >       my @list = @_;                  # private copy
> >       for my $i (1..$#list) {         # Yes, start at 1!
> >           my $j = rand($i+1);         # pick one at or before $i
> >           @list[$i,$j] = @list[$j,$i];  # swap
> >       }
> >       @list;
> >    }
> 
> A simpler approach:
> 
>     sub shuffle {
>         my @new;
>         push @new, $_[rand @_] while @_;
                                 ^^^^^^^^

and if i want the function to return... maybe a 'splice' would be
appropriate.

-- 
Dan Boorstein   home: danboo@negia.net  work: danboo@y-dna.com

 "THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
                         - Cosmic AC


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

Date: Tue, 12 May 1998 14:45:34 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: regexp for strings of chars
Message-Id: <vs8aj6.5cd.ln@localhost>

Lee M Horowitz (lhorow@corp.idt.net) wrote:
: I cant help thinking there's a "neat" way to do this, but somehow I cant
: think of it...
: I'ld like a regexp that matches a string containing a "run" of lets say
: THREE  of the SAME
: letter or number. Any letter or number would do. In other words xaaabcds
: would match
: but so would abcxxx or abc111qzd or .... you get it.


   /([a-zA-Z0-9])\1\1/;


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


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

Date: 12 May 1998 21:49:33 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: regexp for strings of chars
Message-Id: <6jag5d$dou$2@marina.cinenet.net>

Craig Berry (cberry@cinenet.net) wrote:
: Lee M Horowitz (lhorow@corp.idt.net) wrote:
: : I cant help thinking there's a "neat" way to do this, but somehow I cant
: : think of it...
: : I'ld like a regexp that matches a string containing a "run" of lets say
: : THREE  of the SAME
: : letter or number. Any letter or number would do. In other words xaaabcds
: : would match
: : but so would abcxxx or abc111qzd or .... you get it.
: 
: Now, here are some possibilities, which we'll match using /g in a list 
: context to see what pops up from this test string:
: 
:   $_ = 'aaaaaabbb,,,xyfooffff';

Right about here my brain took a long lunch.  See corrected regexes 
(using backreferences, as others have suggested) below each of my 
clue-deficient originals:

:   @a = m/.{3}/g;     # ('aaa', 'aaa', 'bbb', ',,,', 'fff')
         m/(.)\1{2}/g;

:   @b = m/\w{3}/g;    # ('aaa', 'aaa', 'bbb', 'fff')
         m/(\w)\1{2}/g;

:   @c = m/.{3,}/g;    # ('aaaaaa', 'bbb', ',,,', 'ffff')
         m/(.)\1{2,}/g;

:   @d = m/\w{3,}/g;   # ('aaaaaa', 'bbb', 'ffff')
         m/(\w)\1{2,}/g;

Moral:  Never ever answer questions on clpm during little half-minute
breaks from trying to figure out why a major product make that worked
yesterday perfectly well is dying horribly today. :)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Tue, 12 May 1998 18:14:16 -0400
From: "Andrew F. Lee" <andrewf@cp.pathfinder.com>
Subject: Re: RTFM
Message-Id: <Pine.GSO.3.95.980512181129.5697C-100000@cp.pathfinder.com>

On Sat, 9 May 1998, Andre L. wrote:

> Hello, I am a clueless newbie, and since I was told countless times to
> RTFM, I went to the bookstore and asked the clerk there, 'Do you have the
> Fucking Manual?' The clerk took me to a room in the back and handed me a
> copy of the Kama-Sutra and some book by a Dr. Ruth. I am happy to say that
> the examples shown in those manuals work great under a Unix system, but
> obviously I'm not achieving the same performance in a Windows environment.
> Boy, that Schwartzian transform is neat, and it does the job in a flash
> too. 

Oooh, it's Lipschitz too!

> 
> Who knew studying Perl would be such hard work? Though there's something
> to be said for steep learning curves.
> 
> A.L.
> 

Learning Perl on Win32 Systems by Randal L. Schwartz, Tom Christiansen,
Erik W. Olson, published by O'Reilly

Haven't read it ... but I hear it's good.

-------------------------------------------------------------
Andrew F. Lee                 |                              |
Software Engineer             |  parenttime.com              |
email: andrewf@pathfinder.com |  1271 Avenue of the Americas |
Phone: (212) 522-2769         |  New York, N.Y. 10020        |
-------------------------------------------------------------
        When I say, "Ignore the man behind the curtain."   
        That is because there is no man behind the curtain.



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

Date: 12 May 1998 22:24:07 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Scanning Perl scripts for Y2K problems
Message-Id: <6jai67$81u$1@ns1.arlut.utexas.edu>

bart.mediamind@tornado.be (Bart Lateur) writes:
>
> localtime() Y2K compliant? Yeah, right. Calculating years since 1900
> is dubious, to say the least.

localtime() is as Y2K as time(2). No more, no less.

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
            "Look for beauty in roughness, unpolishedness"


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

Date: 12 May 1998 21:09:07 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Set Difference Problem!
Message-Id: <6jadpj$9ia$0@206.165.146.138>

     I think we have a definition of terms problem here.  By your definition
(and I have no problem with it) the code in the PerlFAQ for a difference is
incorrect as it will never produce a result consistent with the stated
definition.  In my post I accepted the definition of difference implied (but
not explicitly stated) by the FAQ and was trying to point out that by such a
definition one would not see the results that Walid expected.

The set
X - Y = { x | x in X and x not in Y }
is called the difference (or relative complement). The
difference X - Y consists of all elements in X that are
not in Y.

@X=(1,2,3,4,5);
@Y=(1,3,6);
X-Y =2,4,5;
Y-X = 6;

Result from FAQ code: 2,4,5,6;

    As I see it, by your definition, the PerlFAQ code is in error.  By the
FAQ's definition, Walid's expectation is wrong.  Either way, he does not
have code that does what he wants.  He originally introduced the analogy to
sets (which is implied in the FAQ) and so I was trying (inarticulately it
seems) to explain continuing with the analogy.  Even though the FAQ actually
refers to arrays.  I shall endevor to be more percise in the future.  I do
appreciate the reference.

    AmD






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

Date: 12 May 1998 21:29:51 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Set Difference Problem!
Message-Id: <6jaf0f$bpi$0@206.165.146.138>

    Does my message sound snippy?  It sounds snippy to me.  Snippy, is kind
of a c.l.p.misc thing but I did not mean to get carried along with the tide.
My apologies in advance for any incorrectly inferred snippiness <grin>.  Not
communicating at all well today.  Must need more sleep.

AmD





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

Date: 12 May 1998 21:02:52 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Significant digit?
Message-Id: <6jadds$mtp$1@news.NERO.NET>

In article <6ja8ab$8p7$1@marina.cinenet.net>,
Craig Berry <cberry@cinenet.net> wrote:
>How about this, only tested in a casual way, but seems to do the job:

I can't get it to run, since:

>  my $trunc     = sprintf "%.*f", $figs, $abcissa;

Use of * in printf format not supported at s2 line 25, <> chunk 1.

It seems close, but I expect it will fail on any answer with trailing
zeros, as will any solution that involves the perl "print" command. If
you print the number 10.00 (which has 4 significant digits), perl shows
you "10", which has but one.



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

Date: Tue, 12 May 1998 17:06:18 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Significant digit?
Message-Id: <comdog-ya02408000R1205981706180001@news.panix.com>
Keywords: from just another new york perl hacker

[follow-ups set to clp.modules]

In article <3558AF3A.A79D7252@shell.com>, Yong Huang <yong@shell.com> posted:

>Brian, I'm a chemist (PhD from Texas A&M last year). That's why I posted the question!

perhaps you like my Chemistry:: module then :)

>Seriously, printf and sprintf won't do the job. It's probably better
>handled as a string using substr, index (rindex) or
>even split. If we ignore rounding (which doesn't hurt much), we don't need
>int, ceil and floor (in POSIX) either. Anyway,
>I expect to see your code soon. If you don't do it, I will, some time later.

well, once you have a number with the correct number of significant
digits, you'll probably also want special operators for them so that
the results of those operations have the correct significant digits
as well.

why don't we take this over to clp.modules.  i'll post an initial
module to deal with getting the number format right, and then we
can talk about operations on those numbers.  (and give me some time
to fetch my chemistry book - those log() operations can be tricky :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: 12 May 1998 21:37:29 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Significant digit?
Message-Id: <6jafep$dou$1@marina.cinenet.net>

John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:
: In article <6ja8ab$8p7$1@marina.cinenet.net>,
: Craig Berry <cberry@cinenet.net> wrote:
: >How about this, only tested in a casual way, but seems to do the job:
: 
: I can't get it to run, since:
: 
: >  my $trunc     = sprintf "%.*f", $figs, $abcissa;
: 
: Use of * in printf format not supported at s2 line 25, <> chunk 1.

Hrm.  I thought Perl's s?printf formatting was handled via C's s?printf 
formatting (with some argument jiggering first, of course), and I'm 
fairly certain that width/precision indirection (the .* trick) is part of 
the ANSI C standard.  Alas, my copy of same is elsewhere.  Anybody have 
one handy to check?

In any case, on systems that don't have .* format handling, replace the 
above line with...um...starting at my previously misnamed 'abcissa', now 
'mantissa':

  my $mantissa  = $val / $expFactor;                                
  my $figFactor = pow(10, $figs);                                   
  my $trunc     = (int ($mantissa * $figFactor + 0.5)) / $figFactor;

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Tue, 12 May 1998 18:14:51 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Tip: Filehandles
Message-Id: <1d8xfyg.lm3396x1i1pcN@slip166-72-108-6.ny.us.ibm.net>

Tom Christiansen <tchrist@mox.perl.com> wrote:

> IO::File is a really lame "cure" for astrophobia.  It costs nearly 5,000
> lines and 17 files.  It is disgusting and insane to take a simple function
> like this:
> 
>     sub get_foo {
>         local *FH;
>         open(FH, '/foo/bar');
>         return *FH;
>     }
> 
> and then go and suck in a megamodule just because you're afraid of a star.

What about making the module less mega? That way existing programs
wouldn't have to be modified.

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: 12 May 1998 22:20:50 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Tip: Filehandles
Message-Id: <6jai02$3d2$3@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, kpreid@ibm.net (Kevin Reid) writes:
:What about making the module less mega? That way existing programs
:wouldn't have to be modified.

Existing programs that use the module needlessly have been seduced by
the grotesque side of Perl.

--tom
-- 
    X-Windows: The Cutting Edge of Obsolescence.
	--Jamie Zawinski


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

Date: 12 May 1998 22:25:34 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Re: Tip: Filehandles
Message-Id: <6jai8u$kse@fridge.shore.net>

Tom Christiansen <tchrist@mox.perl.com> wrote:

: Existing programs that use the module needlessly have been seduced by
: the grotesque side of Perl.

Not <shudder> The Dark Side!!  :-O

--Art

National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
        Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html



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

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

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