[29188] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 432 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 13 09:10:08 2007

Date: Sun, 13 May 2007 06:09:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 13 May 2007     Volume: 11 Number: 432

Today's topics:
        About regular expression question <sonet.all@msa.hinet.net>
        About regular expression question <sonet.all@msa.hinet.net>
    Re: About regular expression question <klaus03@gmail.com>
    Re: About regular expression question <bik.mido@tiscalinet.it>
        cpan -- suppress questions <iler.ml@gmail.com>
        cpan errors with "Undefined subroutine &Compress::Zlib: <iler.ml@gmail.com>
        How can I search and replace a string while preserving  <rsarpi@gmail.com>
    Re: How can I search and replace a string while preserv <someone@example.com>
    Re: Identify if a scalar is int, double or text <sisyphus1@nomail.afraid.org>
    Re: Identify if a scalar is int, double or text <uri@stemsystems.com>
    Re: Identify if a scalar is int, double or text <klaus03@gmail.com>
    Re: Identify if a scalar is int, double or text <bik.mido@tiscalinet.it>
        new CPAN modules on Sun May 13 2007 (Randal Schwartz)
    Re: Perl Tutorial With Exercises <me@home.com>
        Regular Expression Question <sonet.all@msa.hinet.net>
    Re: Regular Expression Question <me@home.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 13 May 2007 14:35:01 +0800
From: "sonet" <sonet.all@msa.hinet.net>
Subject: About regular expression question
Message-Id: <f26bj4$ja0$1@netnews.hinet.net>

The $str is the xml string.
<a>
<c>123</c>
<d>abc</d>
</a>  <b attr='456'/> ...

I need to detect some specific close tag.
ex:
(</a> or <a/>) OR (</b> or <b/>)

1.
if ($str=~/<\/(a|b)>|<(a|b)\/>/s){
#do something A;
}

2.
if ($str=~/<\/(a|b)>/s){
#do something A;
}elsif($str=~/<(a|b)\/>/s){
#do something A;
}

3.
if ($str=~/<\/(.*?)>|<(.*?)\/>/s){
if ($1 eq 'a' || $1 eq 'b'){
#do something A;
}
}

===========================================
Which one is the better? And have any more good RE
pattern for above example?







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

Date: Sun, 13 May 2007 14:37:53 +0800
From: "sonet" <sonet.all@msa.hinet.net>
Subject: About regular expression question
Message-Id: <f26bo7$l33$1@netnews.hinet.net>

The $str is the xml string.
<a>
<c>123</c>
<d>abc</d>
</a>  <b/> ...

I need to detect some specific close tag.
ex:
(</a> or <a/>) OR (</b> or <b/>)

1.
if ($str=~/<\/(a|b)>|<(a|b)\/>/s){
#do something A;
}

2.
if ($str=~/<\/(a|b)>/s){
#do something A;
}elsif($str=~/<(a|b)\/>/s){
#do something A;
}

3.
if ($str=~/<\/(.*?)>|<(.*?)\/>/s){
if ($1 eq 'a' || $1 eq 'b'){
#do something A;
}
}

===========================================
Which one is the better? And have any more good RE
pattern for above example?








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

Date: 13 May 2007 01:55:07 -0700
From: Klaus <klaus03@gmail.com>
Subject: Re: About regular expression question
Message-Id: <1179046507.455412.24970@p77g2000hsh.googlegroups.com>

On May 13, 8:35 am, "sonet" <sonet....@msa.hinet.net> wrote:
> The $str is the xml string.
> <a>
> <c>123</c>
> <d>abc</d>
> </a>  <b attr='456'/> ...
>
> I need to detect some specific close tag.
> ex:
> (</a> or <a/>) OR (</b> or <b/>)

[ snip ]

> And have any more good RE
> pattern for above example?


see Perlfaq4: How do I find matching/nesting anything ?
>> ================================
>> This isn't something that can be done in one regular
>> expression, no matter how complicated.
>> ================================

I would suggest to employ one of the XML modules on CPAN:
http://search.cpan.org/search?query=XML&mode=all

--
Klaus



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

Date: Sun, 13 May 2007 14:10:31 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: About regular expression question
Message-Id: <n00e439iggavcpfs4g1kar8no51dpg3kdc@4ax.com>

On Sun, 13 May 2007 14:37:53 +0800, "sonet" <sonet.all@msa.hinet.net>
wrote:

>Subject: About regular expression question
[snip]
>The $str is the xml string.

Use some XML parsing module.


Michele, who is not reading further
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 13 May 2007 02:44:13 -0700
From: Yakov <iler.ml@gmail.com>
Subject: cpan -- suppress questions
Message-Id: <1179049453.333380.103370@h2g2000hsg.googlegroups.com>

How do I make cpan assume yes to all questions,
or not to ask any questions (the "batch mode") ?
Can I put something into CPAN/MyConfig.pm for that ?

Thanks
Yakov



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

Date: 13 May 2007 03:13:08 -0700
From: Yakov <iler.ml@gmail.com>
Subject: cpan errors with "Undefined subroutine &Compress::Zlib::gzopen"
Message-Id: <1179051187.967580.40600@o5g2000hsb.googlegroups.com>

Whatever I try to install with cpan (for example install
Bundle::CPAN),
I get error:
 .....
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  http://mirror.mirimar.net/cpan/modules/03modlist.data.gz
Going to read /home/lerner/.cpan/sources/modules/03modlist.data.gz
Undefined subroutine &Compress::Zlib::gzopen called at /usr/share/perl/
5.8/CPAN.pm line 5722.

This is perl 5.8.8 on freshly installed debian 4. How do I fix this?

Thanks
Yakov



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

Date: 12 May 2007 20:43:11 -0700
From: rsarpi <rsarpi@gmail.com>
Subject: How can I search and replace a string while preserving (not removing) trailing spaces?
Message-Id: <1179027791.676809.209840@q75g2000hsh.googlegroups.com>

Sorry the dumb question.  I'm a newbie.

But how can I search and replace a string while preserving (not
removing) trailing spaces?

let me explain:  the command 's/$old_string/$new_string/g' inserts the
new string and *moves* spaces to the right or left (depending on the
length of the 'new_string') making the whole sentence bigger or
smaller.

for example:

my $sentence = "*Peter Parker is Spider Man               *";
print length($sentence);  #prints 43 characters

I'd like to know a trick in which, if I get rid of "Peter" I would
_still_ get 43 characters in length for the whole sentence between
both quotation marks.  Here the whole sentence between quotation marks
expands until it reaches 43 chars in length.

my $sentence = "*Parker is Spider Man                     *";
print length($sentence );#still 43


 And if I add to the sentence Benjamin (between Peter and Parker) I
would like to get exactly 43 characters between both quotation marks.
Here the whole sentence between quotation marks shrinks until it gets
up 43 chars in length.

my $sentence = "*Peter Benjamin Parker is Spider Man      *";
print length($sentence ); #still 43



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

Date: Sun, 13 May 2007 04:29:43 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: How can I search and replace a string while preserving (not removing) trailing spaces?
Message-Id: <Xuw1i.9435$Xh3.199@edtnps90>

rsarpi wrote:
> Sorry the dumb question.  I'm a newbie.
> 
> But how can I search and replace a string while preserving (not
> removing) trailing spaces?
> 
> let me explain:  the command 's/$old_string/$new_string/g' inserts the
> new string and *moves* spaces to the right or left (depending on the
> length of the 'new_string') making the whole sentence bigger or
> smaller.
> 
> for example:
> 
> my $sentence = "*Peter Parker is Spider Man               *";
> print length($sentence);  #prints 43 characters
> 
> I'd like to know a trick in which, if I get rid of "Peter" I would
> _still_ get 43 characters in length for the whole sentence between
> both quotation marks.  Here the whole sentence between quotation marks
> expands until it reaches 43 chars in length.
> 
> my $sentence = "*Parker is Spider Man                     *";
> print length($sentence );#still 43
> 
> 
>  And if I add to the sentence Benjamin (between Peter and Parker) I
> would like to get exactly 43 characters between both quotation marks.
> Here the whole sentence between quotation marks shrinks until it gets
> up 43 chars in length.
> 
> my $sentence = "*Peter Benjamin Parker is Spider Man      *";
> print length($sentence ); #still 43

$ perl -e'
my $sentence = "Peter Parker is Spider Man";
printf "*%-43.43s*\n", $sentence;
$sentence = "Parker is Spider Man";
printf "*%-43.43s*\n", $sentence;
$sentence = "Peter Benjamin Parker is Spider Man";
printf "*%-43.43s*\n", $sentence;
'
*Peter Parker is Spider Man                 *
*Parker is Spider Man                       *
*Peter Benjamin Parker is Spider Man        *


perldoc -f printf
perldoc -f sprintf
perldoc -f pack
perldoc -f unpack



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


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

Date: Sun, 13 May 2007 11:59:28 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Identify if a scalar is int, double or text
Message-Id: <464670f1$0$26030$afc38c87@news.optusnet.com.au>


"Klaus" <klaus03@gmail.com> wrote in message
 .
 .
>
> I see, but my accounting program in Perl needs exact rounding (to the
> cent) in a lot of places. As a consequence, the program is littered
> with sprintf("%.0f") to get the rounding I need

If sprintf("%.0f") is doing what you want, just wrap it in your own 
subroutine and call that subroutine instead:

------------------------------------
use warnings;

$bal = 5262558793819;
$interest = $bal * 0.063;
print $interest, "\n";
round(\$interest);
print $interest, "\n";

sub round {
    die "Must pass by reference" if !ref($_[0]);
    ${$_[0]} = sprintf("%.0f", ${$_[0]});
}
------------------------------------

> (I can't use integer,
> because my monetary values exceed 32 bits and I don't want to use
> bigint to avoid the overhead).
>

For the types of calculations you're doing (as I understand it), the 
overhead of Math::BigInt is not all that great. If the numbers get too 
unwieldy (or the number of calculations you're doing gets into the hundreds 
of thousands) use Math::GMP - which is about 5 times faster than M::BI for 
the calculations I envisage you are doing, and about 700 times faster by the 
time you get to multiplications involving 100,000-digit numbers.

Installing Math::GMP is as simple as:
ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-GMP.ppd

Cheers,
Rob



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

Date: Sun, 13 May 2007 02:40:19 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Identify if a scalar is int, double or text
Message-Id: <x77irde99t.fsf@mail.sysarch.com>

>>>>> "K" == Klaus  <klaus03@gmail.com> writes:

  K> On May 12, 8:39 pm, Uri Guttman <u...@stemsystems.com> wrote:

  >> you can force integer match with use integer. but the normal way to
  >> manage money exactly has always been to use an integer for the lowest
  >> denomination. this means for dollars you count integer cents. only when
  >> you convert in/out for printing do you deal with the decimal point. this
  >> way you get total control, speed, accuracy, and easy rounding with
  >> int(). if you want more accuracy (.1 cents) just make that your count
  >> size. and you can overflow to float as a large int (> 32 bits) and get
  >> 47 bits of int so there will never be a loss of digits until you get to
  >> be richer than uncle bill.
  >> 
  >> and i agree with paul, needing to know so much detail is not
  >> perlish. using ints for money is what you want to do and is easy in
  >> perl.

  K> I see, but my accounting program in Perl needs exact rounding (to the
  K> cent) in a lot of places. As a consequence, the program is littered
  K> with sprintf("%.0f") to get the rounding I need (I can't use integer,
  K> because my monetary values exceed 32 bits and I don't want to use
  K> bigint to avoid the overhead).

as i said you can use ints and overflow to doubles (not bigint, machine
double floats) that will hold much more than 32 bits for an integer. so
you are covered there unless your fractions are very small and need too
many of them. or use a 64 bit perl if you have the cpu for it.

  K> Let's assume for the sake of the argument, I had to write an
  K> accounting program in Perl which calculates the * exact * annual
  K> interest rate at 6.3% for Bill's account balance:

  K> =====================================
  K> my $Bills_Balance   = 52_625_587_938_19;
  K> my $Annual_Interest = $Bills_Balance * 0.063;
  K> my $Exact_Interest  = sprintf("%.0f", $Bills_Balance * 0.063);

use int() instead. faster and cleaner.

  K> Balance        = 5262558793819
  K> Interest       = 331541204010.597
  K> Exact Interest = 331541204011

perl -le '$b = 52_625_587_938_19; $intr = $b * .063 ; print $intr ; print int($intr); print int($intr + .5)'
331541204010.597
331541204010
331541204011

look ma! same output, simpler code!

  K> Maybe it is not perlish, but I would very much prefer to have the
  K> variable "$Exact_Interest" tied to an efficient C-subroutine to
  K> replace the ugly sprintf("%.0f").

int() is an efficient c routine inside perl.

  K> I have searched CPAN, but I haven't yet found such a module.

no need for a module. int() is builtin.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 13 May 2007 00:53:07 -0700
From: Klaus <klaus03@gmail.com>
Subject: Re: Identify if a scalar is int, double or text
Message-Id: <1179042787.888211.232240@p77g2000hsh.googlegroups.com>

On May 11, 11:03 am, Klaus <klau...@gmail.com> wrote:
> I want to write a subroutine type_id which returns either 'int',
> 'double', 'text' (or '?') for each of the scalars

On May 11, 2:23 pm, "Sisyphus" <sisyph...@nomail.afraid.org> wrote:
> Be aware that a variable can change from one type to
> another in rather sneaky ways

On May 11, 11:07 pm, anno4...@radom.zrz.tu-berlin.de wrote:
> Glad I could help, but I'm asking myself why you need to
> know these differences

On May 12, 12:09 pm, "Dr.Ruud" <rvtol+n...@isolution.nl> wrote:
> Never heared of bigints?
> http://search.cpan.org/search?query=bigint&mode=all

On May 12, 10:01 pm, Klaus <klau...@gmail.com> wrote:
> I am not an expert on "tie" and I have just started
> reading "perldoc perltie"

On May 13, 4:40 am, Uri Guttman <u...@stemsystems.com> wrote:
> use int() instead. faster and cleaner.
> int() is an efficient c routine inside perl.
> no need for a module. int() is builtin.

With the help of the Perl documentation and the Perl community, I have
understood and resolved my problem.

Thanks.

--
Klaus



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

Date: Sun, 13 May 2007 14:09:08 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Identify if a scalar is int, double or text
Message-Id: <5tvd439gub2uflfbem2sfvq3s9t3p9fjeg@4ax.com>

On 13 May 2007 00:53:07 -0700, Klaus <klaus03@gmail.com> wrote:

>With the help of the Perl documentation and the Perl community, I have
>understood and resolved my problem.

Incidentally, you were having a XY problem:

http://perlmonks.org/?node=XY+problem


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sun, 13 May 2007 04:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun May 13 2007
Message-Id: <JHyqEA.9uD@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Bundle-PDF-0.04
http://search.cpan.org/~ski/Bundle-PDF-0.04/
A bundle to install PDF modules and dependencies
----
Class-C3-0.18
http://search.cpan.org/~blblack/Class-C3-0.18/
A pragma to use the C3 method resolution order algortihm
----
Class-C3-XS-0.04
http://search.cpan.org/~blblack/Class-C3-XS-0.04/
XS speedups for Class::C3
----
Config-INI-Reader-0.004
http://search.cpan.org/~rjbs/Config-INI-Reader-0.004/
a subclassable .ini-file parser
----
DBIx-Class-Validation-0.01004
http://search.cpan.org/~claco/DBIx-Class-Validation-0.01004/
Validate all data before submitting to your database.
----
Data-StackedMap-0.02
http://search.cpan.org/~claesjac/Data-StackedMap-0.02/
An object that stores key/value pairs in a stacked fashion
----
Egg-Plugin-SessionKit-2.00
http://search.cpan.org/~lushe/Egg-Plugin-SessionKit-2.00/
Plugin that manages session.
----
Encode-2.21
http://search.cpan.org/~dankogai/Encode-2.21/
character encodings
----
Games-RolePlay-MapGen-0.31.0
http://search.cpan.org/~jettero/Games-RolePlay-MapGen-0.31.0/
The base object for generating dungeons and maps
----
HTTP-Response-Encoding-0.05
http://search.cpan.org/~dankogai/HTTP-Response-Encoding-0.05/
Adds encoding() to HTTP::Response
----
Log-Dispatch-2.18
http://search.cpan.org/~drolsky/Log-Dispatch-2.18/
Dispatches messages to one or more outputs
----
MRO-Compat-0.02
http://search.cpan.org/~blblack/MRO-Compat-0.02/
mro::* interface compatibility for Perls < 5.9.5
----
Mail-SpamAssassin-Plugin-OpenPGP-1.0.2
http://search.cpan.org/~brondsem/Mail-SpamAssassin-Plugin-OpenPGP-1.0.2/
A SpamAssassin plugin that validates OpenPGP signed email.
----
OOPS-0.2003
http://search.cpan.org/~muir/OOPS-0.2003/
Object Oriented Persistent Store
----
POE-Component-Client-MPD-0.1.1
http://search.cpan.org/~jquelin/POE-Component-Client-MPD-0.1.1/
a full-blown mpd client library
----
POE-Component-Client-MPD-0.1.2
http://search.cpan.org/~jquelin/POE-Component-Client-MPD-0.1.2/
a full-blown mpd client library
----
RRDTool-OO-0.18
http://search.cpan.org/~mschilli/RRDTool-OO-0.18/
Object-oriented interface to RRDTool
----
Sepia-0.72
http://search.cpan.org/~seano/Sepia-0.72/
Simple Emacs-Perl Interface
----
Template-Plugin-PwithBR-0.04
http://search.cpan.org/~taro/Template-Plugin-PwithBR-0.04/
TT Plugin that changes paragraph and newline into p with br.
----
Text-Annotated-Line-0.04
http://search.cpan.org/~wimv/Text-Annotated-Line-0.04/
strings with annotation about their origin
----
WWW-Slides-0.0.9
http://search.cpan.org/~polettix/WWW-Slides-0.0.9/
serve presentations on the Web
----
Web-Scraper-0.07
http://search.cpan.org/~miyagawa/Web-Scraper-0.07/
Web Scraping Toolkit inspired by Scrapi
----
WebService-OCTranspo-0.025
http://search.cpan.org/~doneill/WebService-OCTranspo-0.025/
Access schedule information from www.octranspo.com
----
Wx-Perl-ProcessStream-0.10
http://search.cpan.org/~mdootson/Wx-Perl-ProcessStream-0.10/
access IO of external processes via events
----
XML-API-0.14
http://search.cpan.org/~mlawren/XML-API-0.14/
Perl extension for writing XML


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 13 May 2007 12:06:07 GMT
From: numberwhun <me@home.com>
Subject: Re: Perl Tutorial With Exercises
Message-Id: <4646FF2E.6050308@home.com>

Paul Lalli wrote:
> 
> I also recommend the non-free, paper book called Learning Perl, by
> Randal Schwartz.
> 
> Both contain sample exercises to work on at the end of each chapter.
> 
> Paul Lalli
> 

In addition, I not only recommend Learning Perl, but I recently 
discovered that Brian D Foy produced a student workbook that was put out 
by O'Reilly that has a bunch of extra exercises geared to each chapter 
of the book.  Lots of good practice if you want it.

For your reference, the ISBN is #9780596009960

Regards,

Jeff



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

Date: Sun, 13 May 2007 14:31:45 +0800
From: "sonet" <sonet.all@msa.hinet.net>
Subject: Regular Expression Question
Message-Id: <f26bco$gqe$1@netnews.hinet.net>

The $str is the xml string.
<a>
<c>123</c>
<d>abc</d>
</a>  <b attr='456'/> ...

I need to detect some specific close tag.
ex:
(</a> or <a/>) OR (</b> or <b/>)

1.
if ($str=~/<\/(a|b)>|<(a|b)\/>/s){
#do something A;
}

2.
if ($str=~/<\/(a|b)>/s){
#do something A;
}elsif($str=~/<(a|b)\/>/s){
#do something A;
}

3.
if ($str=~/<\/(.*?)>|<(.*?)\/>/s){
if ($1 eq 'a' || $1 eq 'b'){
#do something A;
}
}

===========================================
Which one is the better? And have any more good RE
pattern for above example?






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

Date: Sun, 13 May 2007 12:02:00 GMT
From: numberwhun <me@home.com>
Subject: Re: Regular Expression Question
Message-Id: <4646FE37.10405@home.com>

Sonet,


sonet wrote:
> The $str is the xml string.
> <a>
> <c>123</c>
> <d>abc</d>
> </a>  <b attr='456'/> ...
> 
> I need to detect some specific close tag.
> ex:
> (</a> or <a/>) OR (</b> or <b/>)
> 
> 1.
> if ($str=~/<\/(a|b)>|<(a|b)\/>/s){
> #do something A;
> }
> 
> 2.
> if ($str=~/<\/(a|b)>/s){
> #do something A;
> }elsif($str=~/<(a|b)\/>/s){
> #do something A;
> }
> 
> 3.
> if ($str=~/<\/(.*?)>|<(.*?)\/>/s){
> if ($1 eq 'a' || $1 eq 'b'){
> #do something A;
> }
> }
> 
> ===========================================
> Which one is the better? And have any more good RE
> pattern for above example?
> 

Personally, one of the things that I love about perl is that TMTOWTDI. 
Granted, there are ways of doing things that are definitely a lot more 
efficient than others, but with the above examples, I would just pick 
whichever one works for you, as it is a simple enough match.  If you are 
truely looking for an opinion, I like #3.

Regards,

Jeff





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

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

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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.

#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 V11 Issue 432
**************************************


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