[11311] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4911 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 16 23:07:26 1999

Date: Tue, 16 Feb 99 20:00:23 -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           Tue, 16 Feb 1999     Volume: 8 Number: 4911

Today's topics:
    Re: /i in regexp kills performance. (Ilya Zakharevich)
    Re: ActivePerl vs. Standard Perl for Win32 (Jim Weisgram)
    Re: Announce: Perl Function Repository (was Re: Calcula <rra@stanford.edu>
        ANNOUNCEMENT: Perl classes Phila/NJ area 1st-2nd week M <joseph@5sigma.com>
        Can anyone convert this VB script to Perl? (win32::ole) Richard.Mayston@mfat.govt.nz
    Re: Finding a hash key based on regexp <rick.delaney@home.com>
    Re: free Perl for NT? (Tad McClellan)
        How do you: extract data from Netware NDS <jgrain@breathemail.net>
    Re: Javascript to browser via perl <leviathan@darktech.org>
    Re: none (Andre L.)
    Re: Opening en printing text files with variables <allan@due.net>
    Re: Opening en printing text files with variables <tchrist@mox.perl.com>
        People Needed For Site training88@hotmail.com
    Re: People Needed For Site (brian d foy)
    Re: Perl Criticism <emschwar@mail.uccs.edu>
    Re: Perl evangelism (brian d foy)
    Re: Perl evangelism (Bart Lateur)
    Re: reference problem <jglascoe@giss.nasa.gov>
    Re: REGEX $1, $2 ... array? (Abigail)
    Re: REGEX $1, $2 ... array? (Ilya Zakharevich)
    Re: Regex Expansion and Metrics dmulholl@cs.indiana.edu
    Re: Regular expression for Currency ??? <ludlow@us.ibm.com>
        reverse ? <diener@darwin.ucsc.edu>
    Re: skipping header in file when doing formated printin <rick.delaney@home.com>
        WWW Hosting for a site in need of CGI <boomer@info-internet.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 17 Feb 1999 00:59:35 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: /i in regexp kills performance.
Message-Id: <7ad49n$p7s$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was NOT sent to Uri Guttman 
<uri@ibnets.com>],
who wrote in article <39u2wmugx0.fsf@ibnets.com>:
>   IZ> Hip Owl documents 5.002.  5.004_04 is *ways* ahead of Hip Owl.
>   >>  as compared perl 5 vs. perl4? you seem to forget that most (and i
>   >> mean MOST) perl programs and programmers never use most of the
>   >> newer features in regexes that you so love.
> 
>   IZ> Why are you putting words in my mouth again?  Did I say anything
>   IZ> about new features?  5.004_04 is *ways* ahead of Hip Owl without
>   IZ> any new feature added.
> 
> that makes no sense. how is it ahead without features? if it is more
> efficient, that is a feature. we are talking regexes here, not the whole
> language. so again i ask you, list the new features of regex in 5.004_04
> not in 5.002. how many of them are used by anyone, let alone newbies.

You do not listen =>>> plonk.

>   IZ> My trn setup honors mail-copies-to: never header.  Use it.
> 
> i don't want to disable other from doing so. occaisionally it is
> warranted. you always do it, i am asking you not to.

Then do not complaint.  I have no way to remember such silly things.
*If* I remember, I will not.  But the results after a couple of hours
will be quite predictable.

Ilya


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

Date: Wed, 17 Feb 1999 03:54:25 GMT
From: jweisgram@hotmail.com (Jim Weisgram)
Subject: Re: ActivePerl vs. Standard Perl for Win32
Message-Id: <36d13d2a.109590335@news.teleport.com>

"Jalil Feghhi" <jalilf@home.com> wrote:

>What is the difference b/w ActivePerl (5.005) and Standard Perl (5.004) for
>Win32? I am new to Perl and would like to know which one I should go for. Is
>one a superset of the other, etc?
>
>Thanks,
>
>-Jalil
>
>
I believe that ActivePerl as of 5.005... is considered "standard Perl" for
Win32. In the past there were two distinct Win32 ports, but no longer.
-- 
Jim Weisgram
Oregon Department of Transportation
email: jweisgram@hotmail.com
All opinions expressed are mine and not my employers (but they ought to be)


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

Date: 16 Feb 1999 16:10:53 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Announce: Perl Function Repository (was Re: Calculate yesterdays date)
Message-Id: <yld839anzm.fsf@windlord.stanford.edu>

In comp.lang.perl.moderated, pshank <pshank@systems.dhl.com> writes:

> The PFR is exactly what I need most at my early stage of
> Perlearning. Many thanks to dgris et al. Now that you've done me a
> favor, I'll bother you.  When I execute your sig I get a compile-time
> error because perl can't find the re.pm module.  Am I missing something
> about how arguments to command-line switches are parsed?

I believe re.pm is new in Perl 5.005.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Tue, 16 Feb 1999 19:12:38 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: ANNOUNCEMENT: Perl classes Phila/NJ area 1st-2nd week March
Message-Id: <36CA2590.BF8831BF@5sigma.com>

I'll be teaching a 4 day introduction to Perl March 2-5 1999 and a
4 day intermediate/advanced class the following week, March 8-11
in Moorestown, NJ (20-30 min from Phila).  There are seats still
available.  Email joseph@5sigma.com for more information and/or
see www.perltraining.com.

	-joseph

--
Joseph N. Hall   http://www.5sigma.com/joseph/  mailto:joseph@5sigma.com
Proprietor, 5 Sigma Productions          P.O. Box 6250 Chandler AZ 85246
*Effective Perl Programming  .............. http://www.effectiveperl.com
*Perl resources & instruction .............. http://www.perltraining.com


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

Date: Wed, 17 Feb 1999 01:16:38 GMT
From: Richard.Mayston@mfat.govt.nz
Subject: Can anyone convert this VB script to Perl? (win32::ole)
Message-Id: <7ad59g$qjj$1@nnrp1.dejanews.com>

We have an Exchange4.0 server with a couple of mailboxes that do automatic
document conversions, and occasionally the the process dies & the messages
bank up in the mailbox. I'd like a Perl script the checks for unread messages
& alerts the HelpDesk if necessary. Technet has an article Programmer's
Guide: MS OLE Messaging with a Visual Basic example.

Can anyone help convert the following VB script to Perl?
I've got as far as:
use Win32::OLE;

The Perl faq on Perl<->Exchange just has use OLE, which doesn't seem to help
anyone, so maybe if we got this woking it could be added to the faq?.



' create a session then log on, supplying username and password
    Set objSession = CreateObject("MAPI.Session")
    ' change the parameters to valid values for your configuration
    objSession.Logon 'profileName:="Princess Leia"

'The following sample code tracks new messages by checking for messages in the
Inbox with the Unread property value True.

' Function: Util_CountUnread
' Purpose:  Count unread messages in a folder
' See documentation topic: Checking For New Mail;
'    Unread property (Message)
Function Util_CountUnread()
Dim cUnread As Integer         ' counter

    On Error GoTo error_olemsg
    If objMessages Is Nothing Then
        MsgBox "must select a messages collection"
        Exit Function
    End If
    Set objMessage = objMessages.GetFirst
    cUnread = 0
    While Not objMessage Is Nothing ' loop through all messages
        If True = objMessage.Unread Then
            cUnread = cUnread + 1
        End If
        Set objMessage = objMessages.GetNext
    Wend
    MsgBox "Number of unread messages = " & cUnread
    Exit Function

error_olemsg:
    MsgBox "Error " & Str(Err) & ": " & Error$(Err)
    Resume Next

End Function


regards, Richard Mayston
Richard.Mayston@mfat.govt.nz

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


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

Date: Wed, 17 Feb 1999 03:15:06 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Finding a hash key based on regexp
Message-Id: <36CA3617.CA959F43@home.com>

[posted & mailed]

Zack wrote:
> 
> I'd love for there to be a way to do a find on the key using a regexp ....
> ie:
>    if (exists $hash{/(whatever)/} ) ...
> 
> I know that syntax is never gonna work, but is there some other 
> similar way?

What if the supplied pattern matches more than one key?  What would be
returned then?

> The tied hash I'm working with has 72,000 keys (and more being added). 
> Searches are starting to bog down a bit.

Maybe you need to look at restructuring the database so that the keys
are actually something that is searched for.  

I'm not sure how different the search keys are from the hash keys, but
if they're not too different you could write a function that would
generate a small list of hash keys to look up.  A simple example would
be using lc() for case insensitive searches (assuming lower case
database keys).

You could also override FETCH in an inherited tied hash to invoke this
function for the provided search string and do the lookups for each
generated hash key.

This will probably not be of much use if you are searching for
substrings of your keys unless you have some way of generating the rest
of the key.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Tue, 16 Feb 1999 19:03:59 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: free Perl for NT?
Message-Id: <vh4da7.r07.ln@magna.metronet.com>

Todd Anthony Delong (tad2x@node10.unix.Virginia.EDU) wrote:
: I have project coming up that will involve Perl development on the PC
: (probably under NT).  I realize that I can purchase the Win32 Perl package
: from O'Reilly, but I was wondering if there is a version of Perl 5 for NT for
: "free" (where a small donation is greatly appreciated).  Ordinarily, I
: wouldn't mind purchasing Perl, but this project will eventually involve
: running the Perl program on ~200 machines, and I'm not all that psyched about
: having to purchase 200 copies of the Win32 version of Perl 5.


   You don't have to purchase _any_ copies of the Win32 version of Perl 5.

   Because Perl is free.

   Just go download it:

      ftp://ftp.nuri.net/pub/CPAN/ports/index.html#win32


   Then go look for an address to send your donation to:

      http://www.perl.org


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


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

Date: 17 Feb 1999 00:11:40 GMT
From: "jgrain" <jgrain@breathemail.net>
Subject: How do you: extract data from Netware NDS
Message-Id: <01be5a09$c6502820$01010101@webserver-win95>

Does anyone have example scripts to extract data from Netware 4.11 NDS
using data posted in a HTML form?

I know this is possible the setup I am running is a Netware 4.11 server
running Netscapes Fastrack Webserver.  A little research has shown that I
just need to be able to make calls, via server side scripting
to Netware's NDS api.  I have so far found no documentation that shows
specific examples using any
server side scripting




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

Date: Wed, 17 Feb 1999 02:56:34 GMT
From: Justin Scott <leviathan@darktech.org>
Subject: Re: Javascript to browser via perl
Message-Id: <36CA3041.21A1A8AD@darktech.org>

> I would like my perl script to send this command to browser:
> javascript:top.text.location.reload(true);
> The syntax:
> Print "Location: javascript:top.text.location.reload(true);\N\N";
> doesn't work.
> How can I do that?

As far as the MIME header goes, it should be ok.. but I think \N is not the same
as a \n in Perl (Yes, I'm a newbie), so it's not sending your line feeds, which
the browser needs, just as in a Content-type:text/html header.

--
-Justin Scott aka Leviathan
 Server Admin, Dark Technologies
 http://www.darktech.org


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

Date: Tue, 16 Feb 1999 20:12:29 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: none
Message-Id: <alecler-1602992012290001@dialup-742.hip.cam.org>

In article <7ad04j$dvc$1@client2.news.psi.net>, abigail@fnx.com wrote:

> soft4u@bigfoot.com (soft4u@bigfoot.com) wrote on MCMXCIII September
> MCMXCIII in <URL:news:99214941.00031@mail.nomailserver.com>:
> :: 
> :: Hi,
> :: We have for sale various apps for the PC.
> :: All softwares with removed the protection.
> :: 
> :: WORLD CONSTRUCTION SET v3
> 
> 
> Now, given that God had WORLD CONSTRUCTION SET v1, and you have
> WORLD CONSTRUCTION SET v3, who had version 2?

Roosevelt and Stalin at Yalta?

Andre


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

Date: Tue, 16 Feb 1999 19:18:57 -0500
From: "Allan M. Due" <allan@due.net>
Subject: Re: Opening en printing text files with variables
Message-Id: <4Wny2.29$986.624@nntp1.nac.net>

Arno Bogaard wrote in message <7ad011$ltj@news3.euro.net>...
:I've got this code:
:    $var = "Even more blabla";
:    open (FILE, "text.txt");
:    while (<FILE>) {
:        print "$_";
:    }
:and this "text.txt" file:
:    Hi everybody
:    This is a variable: $var
:    This is the end of this textfile
:Problem:
:When perl prints $_ it doesn't change $var into 'Even more blabla
:How to solve it?
:Arno Bogaard, arno_22@hotmail.com

Is it me or do these thing come in waves.  Scroll through the posts from today
and look for Tom C.'s new addition to the FAQ that is presented in the posting
entitled:

Opening and printing textfiles containing variables

HTH

AmD






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

Date: 16 Feb 1999 17:49:14 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Opening en printing text files with variables
Message-Id: <36ca120a@csnews>

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

In comp.lang.perl.misc, 
    "Arno Bogaard" <arno_22@hotmail.com> writes:
:I've got this code:
:    $var = "Even more blabla";
:
:    open (FILE, "text.txt");

Forgot to check error return.

:    while (<FILE>) {
:        print "$_";

Spurious quotes.

:    }
:
:and this "text.txt" file:
:
:    Hi everybody
:    This is a variable: $var
:    This is the end of this textfile
:
:Problem:
:
:When perl prints $_ it doesn't change $var into 'Even more blabla
:How to solve it?

Don't do that.

=head2 How can I use a variable as a variable name?

Beginners often think they want to have a variable contain the name
of a variable.

    $fred    = 23;
    $varname = "fred";
    ++$$varname;         # $fred now 24

This works I<sometimes>, but it is a very bad idea for two reasons.

The first reason is that they I<only work on global variables>.
That means above that if $fred is a lexical variable created with my(),
that the code won't work at all: you'll accidentally access the global
and skip right over the private lexical altogether.  Global variables
are bad because they can easily collide accidentally and in general make
for non-scalable and confusing code.

Symbolic references are forbidden under the C<use strict> pragma.
They are not true references and consequently are not reference counted
or garbage collected.

The other reason why using a variable to hold the name of another
variable a bad idea is that the question often stems from a lack of
understanding of Perl data structures, particularly hashes.  By using
symbolic references, you are just using the package's symbol-table hash
(like C<%main::>) instead of a user-defined hash.  The solution is to
use your own hash or a real reference instead.

    $fred    = 23;
    $varname = "fred";
    $USER_VARS{$varname}++;  # not $$varname++

There we're using the %USER_VARS hash instead of symbolic references.
Sometimes this comes up in reading strings from the user with variable
references and wanting to expand them to the values of your perl
program's variables.  This is also a bad idea because it conflates the
program-addressable namespace and the user-addressable one.  Instead of
reading a string and expanding it to the actual contents of your program's
own variables:

    $str = 'this has a $fred and $barney in it';
    $str =~ s/(\$\w+)/$1/eeg;		  # need double eval

Instead, it would be better to keep a hash around like %USER_VARS and have
variable references actually refer to entries in that hash:

    $str =~ s/\$(\w+)/$USER_VARS{$1}/g;   # no /e here at all

That's faster, cleaner, and safer than the previous approach.  Of course,
you don't need to use a dollar sign.  You could use your own scheme to
make it less confusing, like bracketed percent symbols, etc.

    $str = 'this has a %fred% and %barney% in it';
    $str =~ s/%(\w+)%/$USER_VARS{$1}/g;   # no /e here at all

Another reason that folks sometimes think they want a variable to contain
the name of a variable is because they don't know how to build proper
data structures using hashes.  For example, let's say they wanted two
hashes in their program: %fred and %barney, and to use another scalar
variable to refer to those by name.

    $name = "fred";
    $$name{WIFE} = "wilma";     # set %fred

    $name = "barney";           
    $$name{WIFE} = "betty";	# set %barney

This is still a symbolic reference, and is still saddled with the
problems enumerated above.  It would be far better to write:

    $folks{"fred"}{WIFE}   = "wilma";
    $folks{"barney"}{WIFE} = "betty";

And just use a multilevel hash to start with.

The only times that you absolutely I<must> use symbolic references are
when you really must refer to the symbol table.  This may be because it's
something that can't take a real reference to, such as a format name.
Doing so may also be important for method calls, since these always go
through the symbol table for resolution.

In those cases, you would turn off C<strict 'refs'> temporarily so you
can play around with the symbol table.  For example:

    @colors = qw(red blue green yellow orange purple violet);
    for my $name (@colors) {
        no strict 'refs';  # renege for the block
        *$name = sub { "<FONT COLOR='$name'>@_</FONT>" };
    } 

All those functions (red(), blue(), green(), etc.) appear to be separate,
but the real code in the closure actually was compiled only once.

So, sometimes you might want to use symbolic references to directly
manipulate the symbol table.  This doesn't matter for formats, handles, and
subroutines, because they are always global -- you can't use my() on them.
But for scalars, arrays, and hashes -- and usually for subroutines --
you probably want to use hard references only.
-- 
    #else /* !STDSTDIO */     /* The big, slow, and stupid way */
        --Larry Wall in str.c from the 4.0 perl source code


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

Date: Wed, 17 Feb 1999 00:19:01 GMT
From: training88@hotmail.com
Subject: People Needed For Site
Message-Id: <7ad1q1$lbf$5@hirame.wwa.com>

Hello!

We are looking for CGI and Oracle programmers and content
researchers to become a part of a new on-line auction site.
We are offering a percentage of the first years profit for 
this help! If your interested in working with us please drop 
us a email telling us what you can do to help. 
Percentages differ with what you can do.

Thanks
Atec


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

Date: Tue, 16 Feb 1999 20:10:48 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: People Needed For Site
Message-Id: <comdog-ya02408000R1602992010480001@news.panix.com>

In article <7ad1q1$lbf$5@hirame.wwa.com>, training88@hotmail.com posted:

> We are looking for CGI and Oracle programmers and content
> researchers to become a part of a new on-line auction site.
> We are offering a percentage of the first years profit for 
> this help! 

what happens when you post a loss for the first year?  you're
dreaming if you think you'll be in the black that quickly,
especially with much better established auction services getting
almost daily news cycles.

this is my usual warning to people thinking about putting their 
work into something without getting paid.  taking equity but no
money is often a waste of time.  if you are good enough to do this
job, you are good enough to get paid.  and if this job is good enough
to do, it's good enough to draw investor dollars for payroll.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: 16 Feb 1999 18:40:20 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Perl Criticism
Message-Id: <xkfsoc5erjv.fsf@valdemar.col.hp.com>

topmind@technologist.com writes:
> In article <36A4C4A3.79F0EA81@ngb.se>,
>   Staffan Liljas <staffan@ngb.se> wrote:
> > Now you may ask: Why isn't there any dataservers in perl for SQL
> > databases, as there is in, for example, Visual Objects? The reason, if
> > you ask me, is that SQL and other so called relational databas models
> > don't lend themselves well to database server objects of this type.
> > Instead you use session objects etc, which, in fact, makes more sense.
> 
> I am not quite sure what you mean here.

<yoda>
And that is why you fail.
</yoda>

-=Eric
(sorry, couldn't help myself!)


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

Date: Tue, 16 Feb 1999 20:02:59 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl evangelism
Message-Id: <comdog-ya02408000R1602992002590001@news.panix.com>

In article <36C9F49C.341C90EA@mail.uca.edu>, Cameron Dorey <camerond@mail.uca.edu> posted:

> [cc'd to a]
> 
> Well, this reference came up on the one of the Perl for Win32 lists
> today, maybe it'll help you:
> 
> http://www.microsoft.com/sitebuilder/magazine/clinick_perl.asp

from that page:

   Sometimes, those shortcuts can be a little
   counterproductive, though. Perl is famous for its ability to
   create programs that are entirely illegible to everyone but
   the developer who wrote them. The Perl community even has
   obfuscation contests to see who can write the most
   unintelligible Perl code.

it's almost depressing to think that someone might actually
beleive this.  Programmers, not languages, write obfuscated code; and
Perl certainly didn't invent the concept.

more mis-informed crap from an MS marketing droid posing as 
a technology consultant.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Wed, 17 Feb 1999 01:07:26 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl evangelism
Message-Id: <36cc080a.1017046@news.skynet.be>

aixgod@ix.netcom.com wrote:

>Currently, one of the companies I work for is on a kick to reduce everything
>to one platform (NT) and one set of programming "frameworks" (Visual Studio -
>VB primarily ... some J++).  The idea being that the company is already a
>"Microsoft Shop" (because it uses Office...yeah, I know, I have no idea why
>that makes a difference).

Try this on IIS 3 (save as CGI)

	print "Content-type: text/plain\n\n";
	print "Hello, world!\n";

Save as "hello.pl". Make the directory executable but not readable, as
required for server side scripting. Run it.

You will NOT see "Hello world" in your browser. Instead, you'll see the
script's source.

That's MS for you. Buggy. Incredibly buggy. Microsoft will cost you
money beyond belief, NOT save money, because of the endless workarounds
you'll have to build around their stupid bugs.

But that's off topic, off course.

	Bart.


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

Date: Tue, 16 Feb 1999 21:53:19 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: reference problem
Message-Id: <36CA2F1F.C7A4D97B@giss.nasa.gov>

[courtesy copy of post sent to cited author, Eric, via email]

Eric Bohlman wrote:
> 
> Jay Glascoe <jglascoe@giss.nasa.gov> wrote:
> : 
> : the difference is that "[@name]" will actually copy the entire
> : list "@name" prior to stuffing it into a reference.
>
> But copying is exactly what you want here, because the contents of @name
> change on each pass through the loop.

depends on where @name is coming from.  For example

while (<>) { my @words = split /\W+/, $_; push @foo, \@words; }

> Your "correction" will store a
> whole bunch of references to the *last* things read into @name, which is
> surely not what you want.

not what I want, not what it does  ;)

"Micah G. Cook" wrote:
> 
> foreach $line (@node_list) {
	...
>         @name = $line[0] ;
>         $status = "active" ;
>         push (@name,  $status) ;

looks like @name refers to a different list each time through the loop.

--  
	MSDOS was created to keep idiots away from Unix


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

Date: 16 Feb 1999 22:47:34 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: REGEX $1, $2 ... array?
Message-Id: <7acsi6$bu0$1@client2.news.psi.net>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MCMXCV September
MCMXCIII in <URL:news:7acfc9$fch$1@mathserv.mps.ohio-state.edu>:
@@ 
@@ However, this does not fix things which are broken.  I got *very* hot
@@ mail from our system administrator after he spend enormous time trying
@@ to switch to 5.005_02 (as a result, we are running 5.005_54 - he could
@@ not go back to 5.004 - per users' requests?).  


I've no sympathy for incompetent system admins. [1]


[1] No, h2ph not working isn't his fault. Not be able to back up to a
    previous working version is.


Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


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

Date: 17 Feb 1999 01:04:12 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: REGEX $1, $2 ... array?
Message-Id: <7ad4ic$pbg$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Abigail
<abigail@fnx.com>],
who wrote in article <7acsi6$bu0$1@client2.news.psi.net>:
> Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MCMXCV September
> MCMXCIII in <URL:news:7acfc9$fch$1@mathserv.mps.ohio-state.edu>:
> @@ 
> @@ However, this does not fix things which are broken.  I got *very* hot
> @@ mail from our system administrator after he spend enormous time trying
> @@ to switch to 5.005_02 (as a result, we are running 5.005_54 - he could
> @@ not go back to 5.004 - per users' requests?).  
> 
> I've no sympathy for incompetent system admins. [1]

Our sysadm is most competent of all I had seen.  He made his decision,
and AFAIK it is the best choice possible.

What is most funny is to hear discussion of sympathy originating from you.

Ilya

> [1] No, h2ph not working isn't his fault. Not be able to back up to a
>     previous working version is.

You mean that he need to fix all the bugs in 5.004_04 which lead to
the necessity to upgrade?  We have all the old version of Perl present
for those who need it.  But on our network only one version of Perl is
supported.  Currently it is 5.005_54.  I hope that in a week it will
be 5.005_03.


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

Date: Wed, 17 Feb 1999 01:52:46 GMT
From: dmulholl@cs.indiana.edu
Subject: Re: Regex Expansion and Metrics
Message-Id: <7ad7da$sfj$1@nnrp1.dejanews.com>


>
> : is there a routine that can return an
> : integer value for the number of possible expansions of an arbitrary regex?
>
>    What number should it return for      /a*/    ???
>
>    that has an _infinite_ number of possible expansions...
>


Good point.  Perhaps -1 to indicate the problem.  In the other routine (that
would return the expansions) perhaps an argument could be added to set a
limit on the number of returned responses.  If a routine could returned a
single incremental expansions for each call, the infinite list problem is not
an issue.

I take it there are no such regex utilities?

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


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

Date: Tue, 16 Feb 1999 18:40:51 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Regular expression for Currency ???
Message-Id: <36CA1013.534277EF@us.ibm.com>

bill_mcintyre@my-dejanews.com wrote:
 
> What would the regular expression be to test the proper format of currency.
> 
> For example $123,234.00 (I want to ensure 2 decimal places and a comma every
> thousand)

m/^\$\d{1,3}(\,\d{3})*\.\d{2}$/

This will not match on something like '$.99', but will match '$0.99'.

-- 
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)


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

Date: Tue, 16 Feb 1999 16:35:08 -0800
From: John Diener <diener@darwin.ucsc.edu>
Subject: reverse ?
Message-Id: <36CA0EBC.1E6BE6F3@darwin.ucsc.edu>

i am a very novice perl user , and am writing a simple script to take a
dna sequence 5'-ATCG-3'
and spit out its compliment (which is 3'-TACG-5') however i want the
compliment to read 5' to 3' too. so after i read the seq into my hash
andspit it out i want to 'reverse' it. for some reason the reverse
command is not working.  i am using perl 5.04 and i have tried to
impliment the same simple example to reverse an array that in all 3 of
my manuals. i could not find anything in our perl man page on 'reverse'
either.  i hop e i am not being too dense. any help would be very
appreciated.

thanks,
john



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

Date: Wed, 17 Feb 1999 02:45:56 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: skipping header in file when doing formated printing
Message-Id: <36CA2F3F.D2FC4224@home.com>

[posted & mailed]

jocke1s@earthling.net wrote:
> 
> And the problem itself is perfect for awk but since I want to
> get it into some more general use I really would like to
> do it in perl.

If it's perfect for awk, then do it in awk.  Then convert it to perl
using a2p.  A very useful learning tool.

$ a2p awkscript > perlscript

And don't forget to read the Awk Traps section of perltrap.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Tue, 16 Feb 1999 20:58:04 -0500
From: "Boomer" <boomer@info-internet.net>
Subject: WWW Hosting for a site in need of CGI
Message-Id: <7ad7c8$nqs$1@pugsley.tor.metronet.ca>

Hi everyone..
    I'm presently searching for a hosting site.. but my host right now
doesn't allow me to make my own CGI's, scared of big bad hackers. What
should i do? Anyone know a free place to place my CGI's to use them
remotelly? Or someone willing to host my site?

All i need is a little directory for 5 megs, and i'll redirect it to there..

WWW with msgboard, chatroom and pop-mail checking...  So the whole things is
full of CGI's..
I'm still lurning Perl.. but since i lurned VB in 2 days.. i guess i can
lurn Perl in 3 or less.. all i need is to test out my stuff..

It's as if your trying to do grafix without a screen..

Thanks guys..

Reply by mail please..
boomer@info-internet.net




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

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

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