[9962] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3554 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 26 19:02:36 1998

Date: Wed, 26 Aug 98 16:00:25 -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           Wed, 26 Aug 1998     Volume: 8 Number: 3554

Today's topics:
    Re: apache-perl question (Jonathan Stowe)
    Re: Argh! NT Perl <walter@tscinternet.com>
    Re: comp.lang.perl.windows.misc (Bob Trieger)
    Re: comp.lang.perl.windows.misc (Bob Trieger)
    Re: comp.lang.perl.windows.misc <danboo@negia.net>
    Re: comp.lang.perl.windows.misc (Michael J Gebis)
    Re: comp.lang.perl.windows.misc <nguyend7@msu.edu>
        Fort Collins Perl User's Group <gnat@frii.com>
        Help --> Getting ActivePerl, Netscape Enterprise, and N jonassalk@hotmail.com
        How to convince others using perl instead bourne script <dchang@transarc.com>
    Re: How to convince others using perl instead bourne sc <rootbeer@teleport.com>
    Re: How to update an input file? <rootbeer@teleport.com>
    Re: html and perl (Rufus Xavier Sarsaparilla)
    Re: Max value in an array (Craig Berry)
    Re: Max value in an array (Abigail)
    Re: Max value in an array <ajohnson@gpu.srv.ualberta.ca>
        newbie question <jrkst34+@pitt.edu>
    Re: pattern matching (Patrick Timmins)
    Re: pattern matching (James Stout)
        Perl 5.005: Maintenance update 02 is available (Gurusamy Sarathy)
    Re: Perl compiler (Craig Berry)
    Re: Perl compiler <george.kuetemeyer@mail.tju.edu>
    Re: Perl compiler (William D. Reardon)
    Re: Perl compiler (Abigail)
        perl/SSLeay interface: how do you do basic authorizatio <vwass@yahoo.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 26 Aug 1998 22:51:36 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: apache-perl question
Message-Id: <35e465db.80574@news.btinternet.com>

On Tue, 25 Aug 1998 11:07:23 +0900, no.unsoliciteds@dead.end.com wrote
:
>Anton Maximov wrote:
>> 
>> i would like to call a apache's auth routine that pops up the BASIC
>> AuthType dialog box that prompts for the username and password and then
>> sends then to the server for authentication with the .htaccess file. so
>> i guess the question is if there is a module that will let me to pop up
>> that dialog box and let me use the variables later (run them through
>> database query or smth like that). seems like this method will be much
>> secure than html forms.
>> 
>This isn't done through Perl,and although you probably would be better served
>asking in another forum the authorisation dialog is generated by the server
>when one of the docs that is p/w protected is requested by the client. I
>suggest you check if your webserver has a manual explaining HTACCESS files

Actually, If you are using mod_perl with Apache it is most definitely
possible to set up an authentication handler in Perl.  Using the
facilities provided by mod_perl you authenticate against any scheme
that Perl can deal with.  Get mod_perl and check out for example
Apache::AuthenSmb (which can authenticate against an NT domain) all
available from CPAN.

-- 
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Wed, 26 Aug 1998 17:27:48 -0400
From: "Walter Torres" <walter@tscinternet.com>
Subject: Re: Argh! NT Perl
Message-Id: <uUqWPnT09GA.133@upnetnews05>

try...

http://www.activestate.com/support/faqs/win32

walter



>I've installed Win32 Perl and PerlScript and Perl for IIS and don't know
>where to go from here, the batch files ran without error and the
>associations are there, the read/execute has been set on the cgi-bin dir
>and the files run from the command line but not from the web, .pl files
>when typed in the browser actually open the prompt box "save file or
>open"
>
>Would appreciate any help.
>
>Please cc reply to webadmin@bigo.net
>




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

Date: Wed, 26 Aug 1998 20:47:41 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s1sff$2ui$1@ligarius.ultra.net>

Greg Bacon <gbacon@cs.uah.edu> wrote:
-> In article <6s1ljf$7l1$1@strato.ultra.net>,
->         sowmaster@juicepigs.com (Bob Trieger) writes:
-> : Greg Bacon <gbacon@cs.uah.edu> wrote:
-> : -> When you consider that Win32 people are mostly rude or clueless (usually
-> : -> both) and that there are lots of them, we lose doubly.  I'd be more than
-> : -> happy to set aside a place just for them. :-)
-> : 
-> : Are you saying that most people that use Win32 are rude and clueless or 
-> : reading it wrong? I've seen the same thing said about people posting fro
-> : domains. Wait a week and see what kind of crap hits the newsgroups.
-> 
-> Yes, and your long lines illustrated my point nicely.

What long lines? My newsreader wraps at 72.

-> Please provide evidence for the claim that people who post from the
-> ..edu TLD are rude and clueless.

I never said that .edu people were clueless, I said that I have seen people 
speak about them the same way you speak of Win32 users.

-> : I personally feel that those of you that are anti-windows, are just frus
-> : because you only know 1 OS/platform. Pick up a book on Windows and stop 
-> : being so afraid of it. Variety is the spice of life.
-> 
-> See that thing attached to your leg with five other wiggly things
-> sticking off of it?  Try to eat it.  Do this every time you fire off
-> an ill-begotten opinion on things about which you know very little.
-> I have the unfortunate burden of administering NT at work.  I know
-> from personal experience how badly NT sucks.

I guess that makes you a win32 person then? That explains the rudeness.

-> Wouldn't it be silly or even stupid of me to formulate an opinion when
-> I have very few facts on the matter at my disposal?  Careful how you
-> answer, because you will also speak about yourself.

That is just what you did when you painted most people that use Win32 as rude 
and clueless. The operating system that someone is using says nothing about 
their intellect nor their manners.

-> : -> Too bad X-Newsreader: doesn't always tell the real truth, or we might
-> : -> be able to count.
-> : 
-> : Win32 people either don't know how to or are too courteous to screw with
-> : X-Newsreader, unlike those that use *nix platforms and can't keep from 
-> : screwing with `everything'.
-> 
-> That's not what I meant.  X-Newsreader: isn't always an accurate
-> reflection of someone's culture, opinions, and cluefulness.  Unix
-> people may read with a lose32 client.  lose32 people may read with
-> a Unix client.

Gee, how would some clueless win32 moron figure out how to use something as 
advanced as trn?

-> Besides, if not munging X-Newsreader: is the best courtesy that the
-> Win32 crowd can muster, you've just made another contribution to my
-> Win32 Culture Sucks collection.

Aww, shucks. Thanks.


Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972 
  Ext: 1949 and let the jerk that answers know 
  that his toll free number was sent as spam. "


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

Date: Wed, 26 Aug 1998 20:54:32 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s1ssa$2ui$2@ligarius.ultra.net>

Greg Bacon <gbacon@cs.uah.edu> wrote:
-> In article <6s1nq9$pga@mozo.cc.purdue.edu>,
->         gebis@fee.ecn.purdue.edu (Michael J Gebis) writes:
-> : Unix users are just as rude as anybody else.  It's just that we
-> : usually read the FAQ, so we find other ways to express our rudeness.
-> 
-> That's what I meant by `such rude', as in not reading the FAQ and
-> unashamedly asking for handouts and insulting the group by trying to
-> turn it into a free helpdesk.

The number is probably proportionate to the number of users using each of the 
OSes minus all the *nix users that would be just as rude if they could figure 
out how to use/configure their newsreaders?


Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972 
  Ext: 1949 and let the jerk that answers know 
  that his toll free number was sent as spam. "


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

Date: Wed, 26 Aug 1998 16:55:21 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <35E47639.9BF271E6@negia.net>

Greg Bacon wrote:
> 
> In article <6s1ljf$7l1$1@strato.ultra.net>,
>         sowmaster@juicepigs.com (Bob Trieger) writes:
> : Greg Bacon <gbacon@cs.uah.edu> wrote:
> : -> When you consider that Win32 people are mostly rude or clueless (usually
> : -> both) and that there are lots of them, we lose doubly.  I'd be more than
> : -> happy to set aside a place just for them. :-)
> :
> : Are you saying that most people that use Win32 are rude and clueless or
> : reading it wrong? I've seen the same thing said about people posting fro
> : domains. Wait a week and see what kind of crap hits the newsgroups.
> 
> Yes, and your long lines illustrated my point nicely.
> 
> Please provide evidence for the claim that people who post from the
> .edu TLD are rude and clueless.

hmm, this sounds awfully familiar greg. 

s/the\n\.edu TLD/win32/

i believe you've received this challenge previously and failed to
produce any evidence except personal observation. considering the
seriousness of the claim i find this unacceptable (as i do bob's claim).
why is bob required to do that which you are not?

and would you please refrain from chopping people's messages when you
quote. it is quite misleading to "quote" someone inexactly. i agree that
it is a bad practice on their part, but at least you could let it be
known plainly and clearly that you have done so.

thank you,

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

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


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

Date: 26 Aug 1998 22:06:37 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s20td$srj@mozo.cc.purdue.edu>

gbacon@cs.uah.edu (Greg Bacon) writes:

}Please provide evidence for the claim that people who post from the
}.edu TLD are rude and clueless.

The "September" part of Abigail's attribution line.

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: 26 Aug 1998 22:13:57 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s21b5$7t0$1@msunews.cl.msu.edu>

[note quoted text has been edited so it does not exceed 78 columns]

Bob Trieger <sowmaster@juicepigs.com> wrote:
: Greg Bacon <gbacon@cs.uah.edu> wrote:
: -> In article <6s1aak$6cj$1@strato.ultra.net>,
: ->         sowmaster@juicepigs.com (Bob Trieger) writes:

: Are you saying that most people that use Win32 are rude and clueless
: or am I reading it wrong? I've seen the same thing said about people
: posting from .edu domains. Wait a week and see what kind of crap hits
: the newsgroups.

Win32 people are a little rude when the post.  But so are the *nix
people.  The *nix people are rude because some of them are just tired
of answer the same questions over and over again.  That's why the FAQs
are there.  

: I personally feel that those of you that are anti-windows, are just
: frustrated  because you only know 1 OS/platform. Pick up a book on
: Windows and stop  being so afraid of it. Variety is the spice of
: life.

I personally feel that those of you that think Win32(Win95/98/NT) is
the OS sent by god, are just frustrated because they only know 1
OS/plateform.  Pick up a book on Unix and learn that there is a life
without Bill telling you what to think and what you need.

Some history of Windows.
Win32 are all derived (NT is less as much) from Win3.x.  Which is just
the frosty coating on top of MSDOS.  Which use to be PCDOS which was a
hack of QDOS(Quick and Dirty OS), which was a hack of CP/M which was a
hack of UNIX.  So most people are running a hack of a frosty coating
of a hack of a hack of a hack of UNIX.


: -> Too bad X-Newsreader: doesn't always tell the real truth, or we might
: -> be able to count.

: Win32 people either don't know how to or are too courteous to screw
                      ^^^^^^^^^^^^^^           ^^^^^^^^^^^^^
: with the X-Newsreader, unlike those that use *nix platforms and
: can't keep from  screwing with `everything'.

I think it's the former rather than the later.  *nix people like their
control.

-dan


-- 
           Dan Nguyen            | There is only one happiness in
        nguyend7@msu.edu         |   life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 |                   -George Sand



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

Date: 26 Aug 1998 15:05:36 -0600
From: Nathan Torkington <gnat@frii.com>
Subject: Fort Collins Perl User's Group
Message-Id: <5qr9y3a1y7.fsf@prometheus.frii.com>

(this is a last-minute reminder)

If you're in Longmont, Loveland, Fort Collins, or maybe even Denver or
Boulder, and you want to get together in a sympathetic atmosphere to
talk Perl with other like-minded addicts, then this message is for
you.

Meet at 6pm on Wednesday August 26 (the week after the Perl
Conference) at the Sportscaster's Bar and Grill.  It's at 165 E
Boardwalk, just off College Avenue (US 287) in south Fort Collins.
It's the same place the Northern Colorado Linux Users Group meets, and
is a pleasant smokefree bar (with NTN trivia!).

Let's get together for a beer and swap war stories.  I'll even give
you a report on the Perl Conference if you couldn't make it (complete
with photos!).

Share and enjoy,

Nat
(if you're from Denver/Boulder, turn up and find out how to start
your own local group and avoid that hour-long commute!)


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

Date: Wed, 26 Aug 1998 22:37:48 GMT
From: jonassalk@hotmail.com
Subject: Help --> Getting ActivePerl, Netscape Enterprise, and NT to work <--
Message-Id: <35e489ad.8810128@news.inmet.com>

I've got Netscape Enterprise Server 3.5.1 and ActivePerl 502 on
Windows NT Workstation.  I'm trying to call cgi-lib.pl using require,
but it cgi-lib.pl never gets called if the script is executed through
a browser call.  It works fine if I include cgi-lib.pl in my script,
or if I execute the script from the command line.  Any ideas about
what's going on here?
thanks,
Kamran


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

Date: Wed, 26 Aug 1998 17:48:00 -0400
From: Dennis Chang <dchang@transarc.com>
Subject: How to convince others using perl instead bourne scripts
Message-Id: <35E4828F.B9E16F20@transarc.com>

Hi,

My friend keeps saying bourne script and C is more efficient than perl.
Where can I find the advantages and disadvantage among perl, bourne
scripts and C?

Thanks,

--
Dennis Chang





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

Date: Wed, 26 Aug 1998 22:31:21 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to convince others using perl instead bourne scripts
Message-Id: <Pine.GSO.4.02A.9808261530450.4382-100000@user2.teleport.com>

On Wed, 26 Aug 1998, Dennis Chang wrote:

> Subject: How to convince others using perl instead bourne scripts

Get a higher-paying job and make them jealous. :-)

But the FAQ talks about this in section one. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 26 Aug 1998 21:33:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to update an input file?
Message-Id: <Pine.GSO.4.02A.9808261433020.4382-100000@user2.teleport.com>

On Wed, 26 Aug 1998, John Warner wrote:

> What am I doing wrong?

You're not reading the FAQ's entry about updating line-oriented files.
It's in section five, I think. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 26 Aug 1998 14:28:21 -0700
From: kirbyk@best.com (Rufus Xavier Sarsaparilla)
Subject: Re: html and perl
Message-Id: <6s1ull$sf$1@shell2.ba.best.com>

In article <35E46C30.7059FCFF@www.hotmail.com>,
Samuel Pang  <pang38@www.hotmail.com> wrote:
>I'm writing a HTML page where backend is using perl. I wondering is
>there a way that I can call a new HTML page.
>
>I mean in my perl program, once a user click on submit button it started
>process the perl script. During that period I would like to print
>"Please Wait" on the screen. Then at the end of process I would like to
>print "Thank You". But currently both sentence are printed on the same
>page at the same time. Is there a way to invoke another HTML page at the
>end of my process???
>
Yes, it's definitely possible.  The trick is to use fork.  What you want
to do, in rough terms, is to fork off a process that does the slow bit,
have the main process load up a temporary file that has the please wait
screen with a refresh meta tag, and then replace the temporary file with
your results.

Randal Schwartz has, of course, solved this problem in his Web Techniques
column.  Look at:
http://www.stonehenge.com/merlyn/WebTechniques/col20.listing.txt


-- 
Kirby Krueger      O-     kirbyk@best.com 
<*> "Most .sigs this small can't open their own jump gate."


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

Date: 26 Aug 1998 21:07:05 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Max value in an array
Message-Id: <6s1tdp$8g9$2@marina.cinenet.net>

Larry Rosler (lr@hpl.hp.com) wrote:
: In 5.005, it can even be done this way, for the braces-impaired:
: 
:         $max = $_ if $_ > $max foreach @_;
: 
: Neat, huh?

Drool, covet...I've wanted that syntax for a *long* time.  Didn't know it
was actually in 5.005!

: (I can't test it, because no 5.005 yet.  Sigh...)

Me neither...but RSN, I hope.  (Won't be able to use it for 'real work',
where most of what I do is on other peoples' web servers where I'm lucky
to browbeat 'em up to 5.004...but it'll be fun to play with, anyway.) 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: 26 Aug 1998 22:38:17 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Max value in an array
Message-Id: <6s22op$pba$1@client3.news.psi.net>

Craig Berry (cberry@cinenet.net) wrote on MDCCCXXI September MCMXCIII in
<URL: news:6s1i2u$9pm$3@marina.cinenet.net>:
++ Abigail (abigail@fnx.com) wrote:
++ : Mark Fergusson (mferg@hal.ddntl.didata.co.za) wrote on MDCCCXXI September
++ : MCMXCIII in <URL: news:35E40C64.224E5D65@hal.ddntl.didata.co.za>:
++ : ++ Please can someone help with the following:
++ : ++ I have an array which contains  numbers. What is the easiest way to
++ : ++ determine what the maximum value of the numbers is ?
++ : 
++ : map {} is your friend.
++ : 
++ : Here's a Randal-happy version:
++ 
++ Somehow I can't see Randal being happy about map in a void context.

Maybe you should ask him *why* he isn't happy with map in void context.

++ : sub max {
++ :     return unless @_;
++ :     my   $max = shift;
++ :     map {$max = $_ if $_ > $max; ()} @_;
++ 
++ Why not just
++ 
++       foreach (@_) { $max = $_ if $_ > $max };
++ 
++ instead of that last line?  No obfuscation with the () inside the braces,

That's only to keep Randal happy :)

++ no hint of building and throwing away a list of results (even if the ()
++ makes sure the list never grows, of course).

Oh, I see. Throwing away a list of zero elements is bad, but you don't
care about the results of all the assignments?

Or do you honestly believe "$foo = $bar" doesn't have a result?

++ I find that any time you find yourself doing map in a void context, you
++ should instead use foreach.  There may be some case where this is
++ inappropriate, but if so, I haven't encountered it yet. :)

I use map {} where map {} is more intuitive. For finding maxima, it doesn't
matter much. For lots of other things, I'd prefer to use map {} over for ()
any time.

If I'd wanted to restrict myself, I wouldn't use any of map, for, while, if
or even subroutines. goto is all you need.



Abigail
-- 
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Wed, 26 Aug 1998 14:57:13 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Max value in an array
Message-Id: <35E46899.4B9A92D6@gpu.srv.ualberta.ca>

Larry Rosler wrote:
> 
> In article <6s1i2u$9pm$3@marina.cinenet.net> on 26 Aug 1998 17:53:34 GMT,
> Craig Berry <cberry@cinenet.net> says...
> ...
> > Why not just
> >
> >       foreach (@_) { $max = $_ if $_ > $max };
> ...
> 
> In 5.005, it can even be done this way, for the braces-impaired:
> 
>         $max = $_ if $_ > $max foreach @_;
> 
> Neat, huh?
> 
> (I can't test it, because no 5.005 yet.  Sigh...)

not quite, from perlsyn:

       Any simple statement may optionally be followed by a
       SINGLE modifier, just before the terminating semicolon (or

you have two statement modifiers (if and foreach)...although:

$max<$_ and $max=$_ foreach @_;
$max<$_ and $max=$_ for @_;

both work fine with 5.00502
regards
andrew


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

Date: Wed, 26 Aug 1998 18:16:47 -0400
From: Justin Kidder <jrkst34+@pitt.edu>
Subject: newbie question
Message-Id: <35E4894F.EAEEAD08@pitt.edu>

I'm installing a message board script from off the web, but it didn't
work.  So I ran it with the command "perl -w" and I got the following
error:

"my" may clash with future reserved word at multipageboard.cgi line 769.
Syntax error in file multipageboard.cgi at line 769, next 2 tokens "my
("
Execution of multipageboard.cgi aborted due to compilation errors.

Here is my result of "perl -v":

This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: 1.1 $$Date: 1993/05/14 18:36:10 $
Patch level: 36

And here is part of the source from my script that includes the error
(line 3):


sub print_multi_pages
{
   my ($countpages, @page_contents) = @_;
   # Finish by writing the Output to the File

   $pagename = $pageprefix . $countpages . $ext2;
   open (OUTFILE,">$basedir/$pagename")  || die $!;
 
   # print header
   &top_of_form2;
   &print_page_numbers;
   print OUTFILE  "<ul>";
   
   # print body
   $number_of_lines_body = @page_contents;
        for ($count4 = 0; $count4 < $number_of_lines_body; $count4++)
   {
           print OUTFILE "$page_contents[$count4] \n";
   }

   #print ending
   &rest_of_form2;
   
   close(OUTFILE);

}


Can anyone help me out here and tell me how to fix it?  I've never
really studied perl before, and I don't want to have to learn the whole
language to install this one script.  Thanks so much to whoever can help

Justin
-- 
-----------------------------------------------------------------------
Justin Kidder, Research Asst.   |   Automation and Robotics Laboratory
jrkst34+@pitt.edu               |   University of Pittsburgh
                                
               Home page:   http://www.pitt.edu/~jrkst34
-----------------------------------------------------------------------
         There are two rules for ultimate success in life:
                1. Never tell everything you know.


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

Date: Wed, 26 Aug 1998 21:08:56 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: pattern matching
Message-Id: <6s1th7$697$1@nnrp1.dejanews.com>

In article <35e43cdd.29585853@news.nottingham.ac.uk>,
  itxjcs@unix.ccc.nottingham.ac.uk (James Stout) wrote:
> Hi
>
> I've chcked the FAQ's, and have an idea what to do, but I'm not
> totally sure. My attempts have failed.
>
> I am reading text from a database into scalar variables. I want to
> check the text for the @ sign (i.e. and email address - so it would be
> better to check for xxxxxxxxxxx@xxxxxxxxxx.xxxxxx.) If the text
> contains the @ sign, I want to put <a href mailto:$variable_name> in
> front of the text and </a> at the end of that text.
>
> Something like:
>
> $variable = "this could be an email address like
> itxjcs@nottingham.ac.uk";
> $variable = ~/@/;
> if($variable)
> {
>
> 	help please!
>
> }
>
> I've tried it, I get a match, but when I print the $variable, it's a
> bunch of numbers.
[snip]

Have you been following the newsgroup over the past day or two? A very
similar question was asked very recently. Do you know about the
substitution operator? Can we see some of your code?

Something like:

while (<>) {
    s|(\S+\@\S+)|<a href="mailto:$1">$1</a>|g;
    print;
}

Patrick Timmins
U. Nebraska Medical Center

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 26 Aug 1998 21:48:33 GMT
From: itxjcs@unix.ccc.nottingham.ac.uk (James Stout)
Subject: Re: pattern matching
Message-Id: <35e47f49.1502344@news.nottingham.ac.uk>

On 26 Aug 1998 18:37:20 GMT, gbacon@cs.uah.edu (Greg Bacon) wrote:

>In article <35e43cdd.29585853@news.nottingham.ac.uk>,
>	itxjcs@unix.ccc.nottingham.ac.uk (James Stout) writes:
>: $variable = "this could be an email address like itxjcs@nottingham.ac.uk";
>: $variable = ~/@/;
>: if($variable)
>
>[snip]
>
>: I've tried it, I get a match, but when I print the $variable, it's a
>: bunch of numbers. 
>
>You're misunderstanding how the match operator works.  When you sick
>the match operator on some poor scalar, you're asking a question,
>namely does this scalar's value match this regular expression?  The
>match operator then answers yes or no (useful as the condition in an
>if compound statement).
>
>You probably want to do something like
>
>    if ($variable =~ /@/) {
>        print qq{<A Href="MAILTO:$variable">$variable</A>};


OK, I get it. Thanks.

I've read the perlop man page, but can't figure out how to make it
insert <a href mailto$variable_containing_just the
word_with_the@_in:>$variable_containing_just the word_with_the@_in</a>
in place of the word with the @ in only, but keep the rest of the text
in the variable.

So, before I do the operation the variable might contain:

"My email address is itxjcs@nottingham.ac.uk, please email me with
some help! I'd really appreciate it"

And then after it would contain:

"My email address is <a href
mailto:itxjcs@nottingham.ac.uk>itxjcs@nottingham.ac.uk</a>, please
email me with some help! I'd really appreciate it"

Thanks

Jim




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

Date: 26 Aug 1998 21:37:39 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Perl 5.005: Maintenance update 02 is available
Message-Id: <6s1v73$5jq@srvr1.engin.umich.edu>


The second maintenance update for Perl 5.005 was released on August
8, 1998, and is now available from the Comprehensive Perl Network
Archive (CPAN) sites worldwide.  To select from a list of sites, go to:

    http://www.perl.com/CPAN

Note the absence of a trailing `/'.  The actual file can be found at:

    http://www.perl.com/CPAN/authors/id/GSAR/perl5.005_02.tar.gz

For a brief overview of what is new in the 5.005 series and other
important information about reporting problems, see the release
announcement for 5.005:

    http://www.perl.com/CPAN/authors/id/GSAR/perl5.005.announce

More detailed information on changes can be found in "pod/perldelta.pod"
and "Changes" files in the distribution.

WARNING:  Perl 5.005 and later are NOT BINARY COMPATIBILE with releases
prior to 5.005.  You will need to recompile all extensions that require
a C compiler to build (i.e. those that contain XSUBs).  See the
"INSTALL" document for detailed instructions on how to cope.

If you like the spirit in which Perl is made, help cultivate that spirit.
Reveal the sources!  Set knowledge free!


--The Perl Porters


----------------------------------------------------------------------------
SUMMARY OF FIXES IN MAINTENANCE UPDATE 2
----------------------------------------------------------------------------

   + fixed auto-vivification of function parameters (broken since 5.004_74)

   + foreach optimization is less aggressive when the iteration variable
     gets afflicted by magic

   + s/\s*$//g used to read uninitialized memory, sometimes causing
     core dumps with majordomo

   + several win32 fixes: restore binary compatibility with 5.005 for
     PERL_OBJECT builds, improvements to crypt()ic win32 notes, CPAN.pm
     should work better on Win32 (wasn't recognizing exe files before)

   + Open Edition MVS is now a supported platform, EBCDIC support much
     better now

   + C<use overload> bug fixes

   + fix for command-line use of source filters

   + allowed *foo{ARRAY}[0] sugar (i.e. optional intervening arrow)

   + implicit close performed by local(*FH) doesn't affect exit status anymore

   + egcs should work better with Solaris (used to get confused about 'ld')

   + VMS build problems due to typos fixed

   + OS2 improvements: updated README.os2, test suite fixes

   + Machten 4.1.1 support

   + more documentation (perlport much updated, perlfaq* updated)

   + unpack/pack('u',...) bugs fixed

   + newer cperl-mode.el

   + many other little details (see Changes file for list)


----------------------------------------------------------------------------
TESTED PLATFORMS
----------------------------------------------------------------------------

This release is known to build and pass all tests (with some noted
exceptions) on the following platforms:

    ARCHNAME            OSVER	CC		REMARKS
    ------------------------------------------------------------------------
    alpha-dec_osf	4.0	cc
    dos-djgpp		DOS	gcc 2.8.1	posix.t#4, fs.t#18 may fail
    MSWin32-x86		NT4.0	Visual C 5.0sp2 with perlCRT
    MSWin32-x86-thread	NT4.0	Visual C 5.0sp2 with perlCRT
    MSWin32-x86-object	NT4.0	Visual C 5.0sp2 with perlCRT
    MSWin32-x86		NT4.0	Borland C 5.02
    MSWin32-x86-thread	NT4.0	Borland C 5.02
    MSWin32-x86-object	NT4.0	Borland C 5.02
    MSWin32-x86		NT4.0   egcs 1.0.2
    MSWin32-x86-thread	NT4.0   egcs 1.0.2
    IP22-irix		5	gcc 2.7.2.3
    IP28-irix		6.2	cc -n32
    i386-bsdos		3.1	shlicc2 2.7.2.1
    i386-freebsd	2.2.7	gcc 2.7.2.1
    i386-freebsd	3.0-cur	gcc 2.7.2.1
    i586-linux		2.0.34	gcc 2.7.2.3.f.1
    i686-linux		2.0.32	gcc 2.8.1
    i686-linux		2.0.33	gcc 2.7.2.3
    i686-linux		2.0.34	gcc 2.7.2.1	shared libperl
    i86pc-solaris	2.6	gcc 2.7.2.3.f.1
    i86pc-solaris-threa	2.6	gcc 2.7.2.3.f.1
    OPENSTEP-Mach	4_1	cc
    PA-RISC1.1		09.05	gcc 2.8.1
    PA-RISC1.1		10.20	cc
    PA-RISC1.1		10.20	gcc 2.8.1
    ppc-linux		2.1.24  egcs 1.0.3
    ppc-linux-thread	2.1.24  egcs 1.0.3
    sun4-solaris	2.3	cc
    sun4-solaris	2.6	gcc 2.8.1
    sun4-solaris-thread	2.6	gcc 2.8.1
    sun4-solaris	2.5.1	gcc 2.8.1
    sun4-solaris-thread	2.5.1	gcc 2.7.2.1
    sun4-sunos		4.1.3	gcc 2.8.1
    sun4-sunos		4.1.4	egcs 1.0.3
    x86-qnx		424	cc


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

Date: 26 Aug 1998 21:02:21 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6s1t4t$8g9$1@marina.cinenet.net>

Greg Bacon (gbacon@cs.uah.edu) wrote:
: In article <6s1dlu$9pm$1@marina.cinenet.net>,
: 	cberry@cinenet.net (Craig Berry) writes:
: : So again, just to clarify your position,
: 
: Careful.  Those words (or words similar) are often a segway to a
: doomed straw man.

Often so. :)  In this instance, though, I was merely attempting to pin
down what Tom's actual views are.  I keep getting odd mixed signals on
that, and would like to disambiguate things a bit so that this argument
might generate more light and less heat.

: : would it be fair to characterize
: : your views as any of the following?  Choose all that apply:
: : 
: : a) All software, under all circumstances, should be distributed free-
: :    in-the-GNU-sense.
: 
: How long have you been reading this group?  Were you not around when
: Tom lambasted the GPL for its viral qualities?

I was indeed.  The GPL is a specific instance of the broader category
implied by free-itGs.  I interpret the term to mean software that is both
monetarily free and modifiable by anyone for their own purposes.  However,
I am rather curious about how Tom C reconciles his position on GPL with
his views stated in this thread (really curious, that is; no hidden
agenda, just lack of understanding about his position).

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Wed, 26 Aug 1998 17:08:16 -0400
From: George Kuetemeyer <george.kuetemeyer@mail.tju.edu>
Subject: Re: Perl compiler
Message-Id: <35E47940.6B4ABB1A@mail.tju.edu>



Abigail wrote:

> yong (yong@shell.com) wrote on MDCCCXX September MCMXCIII in
> <URL: news:35E2EAEF.6B9E6443@shell.com>:
> ++ I don't know why everybody assumes Lily's hiding source code is because
> ++ she doesn't want to let others pirate her "property of knowledge". One
> ++ can also hide the source code for security reason since it may contain
> ++ passwords.
>
> Which is the case, and which is bad as well.
>

We've started using the perl2exe compiler for reasons other than $$ or security. We
basically want to run production and test instances of scripts on the same box,
perhaps with different releases of Perl. The easiest way to do this is to compile
the scripts on other system(s) and then simply move the executables to the target
machine. That way each instance has its own Perl environment - no conflicts to
worry about - either with standard or home grown packages.



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

Date: Wed, 26 Aug 1998 21:52:43 GMT
From: wdr1@pobox.com (William D. Reardon)
Subject: Re: Perl compiler
Message-Id: <EyBGrw.Ax7@midway.uchicago.edu>

In article <EyAMJB.3uw@world.std.com>,
Andrew M. Langmead <aml@world.std.com> wrote:
>A pasword hidden inside a program is not an element of a secure system.

	Several people so far have said this.  I understand if people
have access to the script, binary, whatever, it's insecure in that
people could look it, log in, etc.  
	But simply have a password in script renders it unsecure
without any qualifications?  This is don't understand.  I've written a
few CGI's that access a database & allow a user to look up information
over the web.[1]  Since the script needs to connect to a database, it
needs a password.  I don't want to prompt the user for it - they
probably wouldn't know it - and even if they did it would be
transmitted across the 'net as cleartext.  They way things are now,
the password is only accessable to someone w/ access to the machine or
packet sniffing, which isn't so bad, since both are on the same local
subnet.  But what's the proper solution then?

Puzzled,
-Bill

[1] None of these are 'serious', so a security breach wouldn't be too
-- 
William Reardon							 wdr1@pobox.com
Hold fast to dreams, for if dreams die, life is a broken bird that cannot fly.
                  -Langston Hughes


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

Date: 26 Aug 1998 22:47:38 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl compiler
Message-Id: <6s23aa$pba$2@client3.news.psi.net>

Bruce Barnett (see.my.address.below@domain.com) wrote on MDCCCXXI
September MCMXCIII in <URL: news:yek7lzvsnr4.fsf@grymoire.birch>:
++ Tom Christiansen <tchrist@mox.perl.com> writes:
++ 
++ > Your program is almost certainly worth nothing anyway -- is it now?
++ 
++ Please Tom. There is no reason to insult someone.
++ Life is not so simple as you would like to believe.
++ 
++ Suppose some company invested $250,000 in a project written in
++ PERL. Suppose patents were pending on the concepts.  Suppose those
++ that funded it wanted to get compensated for it?

*Bzzzzzt* Wrong answer. You cannot get a patent if you keep it a secret.
One of the requirements for getting a patent is the publish the invention.

You get exclusive production rights for a limited set of years.

++ > Just give it away, Lily, and become famous if it's a wonderful program.
++ 
++ Suppose it is not Lily's to give away, but instead belongs to the
++ people who funded it.


The people who decided to write it in Perl should have thought about
this question before. 



Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: Wed, 26 Aug 1998 22:17:17 GMT
From: Vincent Wass <vwass@yahoo.com>
Subject: perl/SSLeay interface: how do you do basic authorization for https?
Message-Id: <35E488FE.B709D5E8@yahoo.com>

Hi, I have installed both SSLeay and the perl/SSLeay 
interface module.  I have been able to interact with
https webpages just fine.  But I haven't been able to
figure out how to access an https site which requires
basic authorization (login and password). 

I have a feeling it should be simple, but I just don't
know the syntax.  If any one could give me a clue,
I'd be grateful.

thanks,
Vincent Wass


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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