[10496] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4088 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 27 22:05:55 1998

Date: Tue, 27 Oct 98 19:00:19 -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, 27 Oct 1998     Volume: 8 Number: 4088

Today's topics:
    Re: ASP for unix servers <rootbeer@teleport.com>
    Re: ASP for unix servers (Ethan H. Poole)
        END{exit(1)} stuart_poulin@nospam.yahoo.com
    Re: getopts question <kprice@cardinal.co.nz>
        Mail and News (was: psychology of language choice) <sdm7g@virginia.edu>
    Re: non-looping range match (Brand Hilton)
    Re: non-looping range match <rootbeer@teleport.com>
    Re: non-looping range match <r28629@email.sps.mot.com>
    Re: Not to start a language war but.. (David N. Welton)
    Re: Not to start a language war but.. <Klaus.Schilling@home.ivm.de>
    Re: Perl & Y2K - booby trap code (Sam Holden)
    Re: Perl & Y2K - booby trap code <rra@stanford.edu>
    Re: Perl Cookbook - is this the best perl book? <tjhill@flash.net>
    Re: Perl unix to nt port <kprice@cardinal.co.nz>
    Re: Perl XS using C++ classes (Nathan V. Patwardhan)
    Re: persistent variables ? <dgris@rand.dimensional.com>
    Re: persistent variables ? <Paul.Coleman@CoSeCo.com>
    Re: persistent variables ? (Alastair)
    Re: persistent variables ? <r28629@email.sps.mot.com>
    Re: persistent variables ? <ljz@asfast.com>
    Re: persistent variables ? (Sam Holden)
    Re: persistent variables ? <Paul.Coleman@CoSeCo.com>
    Re: psychology of language choice (was Re: language war <greg@cosc.canterbury.ac.nz>
        USE declaration for modules in remote directories <tjhill@flash.net>
    Re: Using Window-target in HTTP header not outputting t (Joergen W. Lang)
        Which Perl for WIN NT server w IIS <fncll@aurora.alaska.edu>
    Re: Which Perl for WIN NT server w IIS <perlguy@technologist.com>
    Re: Word Wrap (Sam Holden)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 28 Oct 1998 01:12:41 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: ASP for unix servers
Message-Id: <Pine.GSO.4.02A.9810271712290.3421-100000@user2.teleport.com>

On Tue, 27 Oct 1998, Marco de Moulin wrote:

> I am looking for a program that works as easy and comfortable like ASP
> (active server pages from MS). 

If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!

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



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

Date: Wed, 28 Oct 1998 02:22:58 GMT
From: ehpoole@ingress.com (Ethan H. Poole)
Subject: Re: ASP for unix servers
Message-Id: <6evZ1.1154$Qf3.2907@news9.ispnews.com>

In article <Pine.GSO.4.02A.9810271712290.3421-100000@user2.teleport.com>, 
rootbeer@teleport.com says...
>
>On Tue, 27 Oct 1998, Marco de Moulin wrote:
>
>> I am looking for a program that works as easy and comfortable like ASP
>> (active server pages from MS). 
>
>If you're wishing merely to _find_ (as opposed to write) programs,
>this newsgroup may not be the best resource for you. There are many
>freeware and shareware archives which you can find by searching Yahoo
>or a similar service. Hope this helps!

Just my opinion, but I would say that Perl pretty much meets the original 
poster's requirements.

-- 
Ethan H. Poole              | Website Design and Hosting,
                            | CGI Programming (Perl & C)..
========Personal=========== | ============================
* ehpoole @ ingress . com * | --Interact2Day--
http://home1.gte.net/ehp/   | http://www.interact2day.com/



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

Date: Tue, 27 Oct 1998 18:15:56 -0800
From: stuart_poulin@nospam.yahoo.com
Subject: END{exit(1)}
Message-Id: <36367E5C.2F9B3F61@nospam.yahoo.com>

I would like to exit from a script using the END block and and exit
value.  Is this possible?

 perl -Mdiagnostics -e 'END{exit(0)}'; echo $?
0
 perl -Mdiagnostics -e 'END{exit(1)}'; echo $?
Callback called exit (#1)
    
    (F) A subroutine invoked from an external package via perl_call_sv()
    exited by calling exit.
    
Uncaught exception from user code:
        Callback called exit.
END failed--cleanup aborted.
2


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

Date: Wed, 28 Oct 1998 15:27:01 +1300
From: Kelvin Price <kprice@cardinal.co.nz>
To: Chintan Adhyapak <ChintanA@worldnetcorp.com>
Subject: Re: getopts question
Message-Id: <363680F5.C98DCF37@cardinal.co.nz>

Chintan Adhyapak wrote:
> 
> fact. However, you can always check to see whether @ARGV has been
> completely emptied or not - that is, whether all arguments have been
> processed."
> How do I verify that? Thanks,
> 
If @ARGV = () (IE The @ARGV list equals an empty list) then there are no
more arguments.


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

Date: Wed, 28 Oct 1998 00:09:11 GMT
From: "Steven D. Majewski" <sdm7g@virginia.edu>
Subject: Mail and News (was: psychology of language choice)
Message-Id: <Pine.A32.3.96.981027184418.16136A-100000@elvis.med.Virginia.EDU>


On Tue, 27 Oct 1998, Uri Guttman wrote:

> >>>>> "GM" == Gordon McMillan <gmcm@hypernet.com> writes:
> 
>   GM> Uri Guttman writes:
>   >> but by replying to me and the gateway, the perl group wouldn't see
>   >> your message. that is a problem if you want to be in this thread.
>   >> and i don't wish to keep copying your letters to the perl group.
> 
>   GM> I read, and respond to, the Python group, not the Perl group.
> 
> no you read and respond to the python gateway and not the group. your
> headers do not have newsgroups: in them. your reply should be to all
> CC's and groups. if you read the group directly or your email supported
> news this would no be a problem.


Just so you don't think THIS hasn't been endlessly argued about either... 


Unfortunately, you can't please everyone, and a very vocal minority
complained about that when it was the default behaviour of the 
gateway. There has been violent disagreement in several mail and 
news related newsgroups and mailing lists about the meaning of 
the "Newsgroups:" header when it's  found in an email message. 

Also, if you do attempt to both post a reply to a newsgroup and
reply by mail to the sender, you will also get flamed by folks 
who consider that wrong. Some folks think getting CC-ed directly
is a polite consideration, as they don't haunt the newsgroups and
might miss a reply that is posted, while others will complain 
that they didn't know that you also posted a reply publicly. 
( Something that would be clear if there were an agreed upon 
 meaning for "Newsgroups:" ) 


Since the last of those flame wars, I have noticed some internet 
drafts that have tried to address this question. I haven't read those 
drafts, as I was sick of the issue by then, and I expect that,
as an "internet-draft" is not a standard, half of the minority
who really cares about the issue will complain no matter what 
you do! 

And just in case you think you're making someone happy by manually
crossposting email replies from one newsgroup to another, there 
have also been a few old threads discussing the 'evils of crossposting'! 


My mailreader let me put comp.lang.perl.misc into the Newsgroups:
line, and it should then both post and mail the message, but YOUR
message came stripped of any Newsgroups: header, so I'm assuming
that comp.lang.perl.misc was the newsgroup you were referring to. 
This header line is, I believe, stripped by the news/mail gateway
because other folks (mostly from comp.lang.perl, I recall BTW) 
complained about it when it wasn't stripped. 


---|  Steven D. Majewski   (804-982-0831)  <sdm7g@Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---

"I'm not as big a fool as I used to be, I'm a smaller fool." - Jack Kerouac
Some of the Dharma  <http://members.aol.com/kerouacsis/SomeDharma.html>



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

Date: 28 Oct 1998 00:15:43 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: non-looping range match
Message-Id: <715nnf$bh11@mercury.adc.com>

Um... I just did exactly what you posted, and it worked fine under
5.004_02.

In article <36365CFB.93373F18@ozemail.com.au>,
Ian Church  <ianchurc@ozemail.com.au> wrote:
>
>
>Hi,
>
>    how do I extract a range of lines in a file up to the first
>occurance of a pattern
>
>    eg if my file contains:
>
>            abc
>            def
>            ghi
>            jkl
>            mno
>            ghi
>
>using something like:
>
>    perl -ne 'print if /abc/ .. /ghi/'
>
>    I want:
>
>        abc
>        def
>        ghi
>
>The range operators loop and hence I get the whole file as a match.
>
>any ideas???
>
>    Ian Church
>


-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: Wed, 28 Oct 1998 01:21:03 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: non-looping range match
Message-Id: <Pine.GSO.4.02A.9810271719291.3421-100000@user2.teleport.com>

On Wed, 28 Oct 1998, Ian Church wrote:

>     eg if my file contains:
> 
>             abc
>             def
>             ghi
>             jkl
>             mno
>             ghi
> 
> using something like:
> 
>     perl -ne 'print if /abc/ .. /ghi/'
> 
>     I want:
> 
>         abc
>         def
>         ghi
> 
> The range operators loop and hence I get the whole file as a match.

Not with my copy of perl. Doesn't yours do just as you ask? Maybe you
should try it again. Hope this helps!

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



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

Date: Tue, 27 Oct 1998 18:53:25 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: non-looping range match
Message-Id: <36366B05.6C5CEFED@email.sps.mot.com>

Ian Church wrote:
[...]
>     eg if my file contains:
> 
>             abc
>             def
>             ghi
>             jkl
>             mno
>             ghi
> 
> using something like:
> 
>     perl -ne 'print if /abc/ .. /ghi/'
> 
>     I want:
> 
>         abc
>         def
>         ghi
> 
> The range operators loop and hence I get the whole file as a match.

Seemed to work the way you want it on my machine (Solaris 2.5,
Perl5.005). Have you tried it? What's the output looked like? Any code
to show?

-tk


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

Date: 25 Oct 1998 21:40:32 -0800
From: davidw@cks.com (David N. Welton)
Subject: Re: Not to start a language war but..
Message-Id: <87u30rubhr.fsf@cks.com>

Klaus Schilling <Klaus.Schilling@home.ivm.de> writes:

> Scheme is tons easier to get started with for crappy programmers like myself, 
> who have only pure abstractions in their mind and lack any practical clue, and 
> still there are way less Guilers than Pythoneers, let alone Perlers or Tclers.
> 1:100000 is not enough there. May I borrow some thousands of your supercrappy 
> programmers for some guile-based projects?

Hi:->

Guile lacks a lot of the tools that the other languages have right
now, like a good hash table implementation, a good C interface, and
some other things (OO things?).  Guile will probably get these things
soon, due to the hard work of some dedicated people, but then it will
still be just 'guile' and by no means any kind of standard for scheme.

In any case, scheme really is pretty cool, and is well worth some time
and thought:

http://gargle.red-bean.com/guile/

Ciao,
-- 
David Welton                         http://www.efn.org/~davidw

		 --Debian GNU/Linux--

PS:

Here's my own egotistical take on Python, Tcl and Perl, like it really
matters to anyone..:->

Perl: good for text processing, quick throw away scripts, can be good
for bigger projects, but leaves me with a feeling of being sort of
bloated for these things.

Tcl: not such a hot language, but a first rage C API, making it the
best for tight integration with C, which is what it was originally
intended for.

Python: I'm new to this, but so far I really like it.  It seems
cleaner than perl, and has a good C API.  It seems a bit more scalable
and 'all purpose' than the other two.


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

Date: 28 Oct 1998 03:16:12 +0100
From: Klaus Schilling <Klaus.Schilling@home.ivm.de>
Subject: Re: Not to start a language war but..
Message-Id: <874ssp2zyr.fsf@ivm.de>

John Call <johnc@interactive.ibm.com> writes:
> 
> Speaking of wars, remember the "Burger-wars"? Where's the beef?
> 
> Use the language that has the beef. Perl has the beef sometimes and so does Python.
> Neither has the beef all the time.
> 
> As for me and what I do, Perl has the BEEF!

Is there a version that vegetarians can understand?

	Klaus Schilling



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

Date: 28 Oct 1998 00:30:17 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <slrn73cpcp.nfg.sholden@pgrad.cs.usyd.edu.au>

On Tue, 27 Oct 1998 14:42:02 GMT, jkane@my-dejanews.com
	<jkane@my-dejanews.com> wrote:
>In article <slrn73a60q.mba.sholden@pgrad.cs.usyd.edu.au>,
>  sholden@cs.usyd.edu.au wrote:
>
>> >Thanks and I hope this is not a FAQ. :{ (
>>
>> Why don't you go and read the FAQ to find out first.
>>
>> =head2 Does Perl have a year 2000 problem?  Is Perl Y2K compliant?
>
>I really appreciate your helpful response. (NOT!)  I had already read that,
>but nowhere did it mention that in 2000 that the return would become 3
>digits! Kinda useless.	I was left without anything.
>
>Thanks to those who did give an answer.

=head2 Does Perl have a year 2000 problem?  Is Perl Y2K compliant?

Short answer: No, Perl does not have a Year 2000 problem.  Yes,
Perl is Y2K compliant.  The programmers you're hired to use it,
however, probably are not.

Long answer: Perl is just as Y2K compliant as your pencil--no more,
and no less.  The date and time functions supplied with perl (gmtime
and localtime) supply adequate information to determine the year well
beyond 2000 (2038 is when trouble strikes for 32-bit machines).  The
year returned by these functions when used in an array context is the
year minus 1900.  For years between 1910 and 1999 this I<happens> to
be a 2-digit decimal number. To avoid the year 2000 problem simply do
not treat the year as a 2-digit number.  It isn't.
 

How does 'the year minus 1900' equate to two digits...

You better go and check all your code for things like :
$x - 1900

You never know they might not work when $x>1999 since perl's integers
obviously only have two digits!!!!!!
 
I assumed you would know what an integer is... must be hard to program
when you think 2000-1900 == 00...

-- 
Sam

PC's are backwards ... throw them out! Linux is ok though.
	--Rob Pike (on the subject of CR/LF etc)


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

Date: 27 Oct 1998 17:22:03 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <yl1znto4zo.fsf@windlord.stanford.edu>

Matt Knecht <hex@voicenet.com> writes:
> Uri Guttman <uri@fastengines.com> wrote:

>> and strftime is the best way but rarely mentioned. everyone seems to
>> use localtime.

> Why is strftime better than localtime?  Note: I'm not flaming ... I
> really want to know!

localtime is faster.  strftime means that you don't have to do all the
grungy number formatting yourself, you don't have to store arrays of month
and week names, and you automatically get the benefit of system locales
and generate names in the right language.  But it means you have to load
POSIX.

-- 
#!/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, 27 Oct 1998 18:15:21 -0800
From: "Tom Hill" <tjhill@flash.net>
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <715uq9$hcb$1@excalibur.flash.net>

This book continues to be immense help to me. Kudos to Tom, Nathan and
OReilly for it. I have many others that I think are excellent as well
(Programming Perl, Learning Perl, Advanced Perl Programming... hmmm, an
O'Reilly trend...)

paulwade@my-dejanews.com wrote in message
<70foh8$c13$1@nnrp1.dejanews.com>...
>In article <6vv8h6$799$1@nnrp1.dejanews.com>,
>  lqyrms@nottingham.ac.uk wrote:
>> Could anybody who has read the Perl Cookbook please tell me if this is
the
>> best perl book to get. There are a couple of reviews of this book at
amazon
>>




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

Date: Wed, 28 Oct 1998 13:01:23 +1300
From: Kelvin Price <kprice@cardinal.co.nz>
Subject: Re: Perl unix to nt port
Message-Id: <36365ED3.AE719B6@cardinal.co.nz>

scheiner@my-dejanews.com wrote:
> 
> > > This works on unix but not NT.  Any suggestions?
> > > sub preview_card {
> > >     $htmlpath = path goes here;
> > >
> > >     open(TFILE, "$htmlpath/$postcard\pre.html");
> >
> > It is unlikely that the last element in the path is the concatenation of
> > the value of $postcard and the string 'pre.html' -- but that's what this
> > code says.
> 
> It is supposed to be a concatenation.  There is a series of files that all
> end in "pre.html".  What goes ahead of that (i.e. the value of $postcard) is
> what the user has selected in a form.  The problem is, the files simply won't
> open on the NT side.  When I insert die statements, I get back "document
> contains no data messages".
> 
> For some reason, the document does not open on NT, my question is why.
> 

If you are saying that $postcard = "thing" and you want
$path/$postcard\pre.html 
to produce $path/thingpre.html try $path/${postcard}pre.html


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

Date: Wed, 28 Oct 1998 02:42:53 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl XS using C++ classes
Message-Id: <NwvZ1.579$dP4.103218@news.shore.net>

Jamie Walker (jamie@howgarth.demon.co.uk) wrote:

: I have developed a C++ class library for querying a database, and am trying
: to make a perl module to access this library. My problem is, I can't
: everything to link together: the furthest I have got was a segfault on 'make
: test' :(

Which version of Perl are you using?  And for what platform?  You'll
have to follow some instructions to (perhaps) diddle your 'perl' as
laid out in the references below. 

: Please can someone show me some documentation on using XS with C++? Surely
: this is possible ?

Oy.  Unfortunately it's not something that I can describe easily in
2-3 short lines.  But you'll have luck with the following (like I
did -- thank you, thighmaster!):

1) the perlxs manpage (there's a brief section about Using XS with C++
   which has one example)
2) query for "XS C++" from the perl5-porters mailing list archive
   which gives 2-3 suggestions
3) The "XS Cookbook" by Dean Roehrich.  You can find *exactly* what
   you're looking for in "CookbookB-19960430.tar.gz".  This is on CPAN
   in authors/id/DMR/CookBookB-19960430.tar.gz.
4) _Advanced Perl Programming_ (there's a nice section about both XS/C++
   and SWiG/C++).  _APP_ is published by O'Reilly and Associates.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Wed, 28 Oct 1998 00:05:38 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: persistent variables ?
Message-Id: <m3lnm1bm11.fsf@rand.dimensional.com>

"_Paul Coleman" <Paul.Coleman@CoSeCo.com> writes:

> Hi Daniel,
> I can only relate this to Microsoft ASP.  It seems to have provoked a mean
> streak in the group.  

Sorry, enough clueless questions will do that to a group of people
eventually.

<snip>

Take a look at the Data::Dumper module, it provides a way to 
dump a textual representation of your data to a file.  The
contents of the file can later be C<eval>'ed to recreate the
original data structures.  Right off hand, I think that it
may be easiest to either dump your data normally into a text
file. Taking precautions to ensure that one user's data is
properly segregated from another's shouldn't be particularly
difficult.  It also may be worthwhile to see about dumping
your data into hidden fileds on your form and then reloading
them from the next CGI request.

HTH.

dgris
-- 
Daniel Grisinger          dgris@perrin.dimensional.com
Supporter of grumpiness where grumpiness is due on clpm.
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Tue, 27 Oct 1998 19:08:28 -0500
From: "_Paul Coleman" <Paul.Coleman@CoSeCo.com>
Subject: Re: persistent variables ?
Message-Id: <363661e7.0@news3.paonline.com>

Hi Alastair,
I am familiar with the CGI module and it does not provide the functions I am
looking for.  I can't see how hidden form field could solve the problem
unless you are suggesting that I pass the Data via a form to the next Web
Page.   This is not what I am asking about.  I am trying not to pass all of
that data back and forth.  It would be a smaller burden on the net if it
stayed on the server and was picket up by the next page.
I wold think that a question about Perl, even if it involve CGI, HTML or
anything else would ok to post on a Perl newsgroup if it was about Perl.
Thanks again,
Paul Coleman

Alastair wrote in message ...
>
>Yes, that's the basic reason. People seem to think any 'web' or 'cgi' or
'html'
>question can be asked in a Perl newsgroup. Your question has all the
hallmarks
>of such. Perhaps this might help - look at the CGI module and perhaps
'hidden'
>form fields ...
>







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

Date: Wed, 28 Oct 1998 00:20:49 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: persistent variables ?
Message-Id: <slrn73csjs.55.alastair@calliope.demon.co.uk>

_Paul Coleman <Paul.Coleman@CoSeCo.com> wrote:
>Hi Alastair,
>I am familiar with the CGI module and it does not provide the functions I am
>looking for.  I can't see how hidden form field could solve the problem
>unless you are suggesting that I pass the Data via a form to the next Web
>Page.   This is not what I am asking about.  I am trying not to pass all of
>that data back and forth.  It would be a smaller burden on the net if it
>stayed on the server and was picket up by the next page.

OK. Then start by asking yourself 'what exactly is this fabled ASP persistent
object, really?'. I bet it's not rocket science. As others have pointed out, it
might be worth looking at dumping your perl s'ate' to a file using something
like the Data::Dumper module. Check your local bookshop and browse a few Perl
books. I think both 'Advanced Perl Programming' and the 'Perl Cookbook' talk
about persistent object implementations.

BTW - I suspect you don't need to worry about using network bandwidth on passing
'hidden' form fields around. Passing image data takes care of that ...


-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Tue, 27 Oct 1998 18:09:46 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: persistent variables ?
Message-Id: <363660CA.BB74F2EB@email.sps.mot.com>

_Paul Coleman wrote:

> I think you don't understand my question.  I am asking a question that is
> specific to Perl.  In Microsoft's ASP, two objects are provided as part of

This is your original post:
-----------------------------------
Hi,
Is there a way to have persistent variables (or information) across Web
Pages?
Paul Coleman
-----------------------------------

Which part of you question is so specific to Perl, s/variables/Perl/ ?
Well, maybe I should give up Perl and learn French instead.

Microsoft ASP??? Perl???

-tk


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

Date: 27 Oct 1998 20:23:58 -500
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: persistent variables ?
Message-Id: <ltvhl5v5qp.fsf@asfast.com>

"_Paul Coleman" <Paul.Coleman@CoSeCo.com> writes:

> Hi Alastair, I am familiar with the CGI module and it does not provide
> the functions I am looking for.  I can't see how hidden form field
> could solve the problem unless you are suggesting that I pass the Data
> via a form to the next Web Page.  This is not what I am asking about.
> I am trying not to pass all of that data back and forth.  It would be
> a smaller burden on the net if it stayed on the server and was picket
> up by the next page.  I wold think that a question about Perl, even if
> it involve CGI, HTML or anything else would ok to post on a Perl
> newsgroup if it was about Perl.  Thanks again, Paul Coleman

Well, if I'm not mistaken, ASP's handle persistent data by storing it
in web-server memory, so that repeated http invocations can access the
same variables.

That same thing can be done in non-Microsoft web servers, and there is
indeed a very Perl-ish way to do this: the "modperl" module for the
Apache web server.  I personally recommend installing Apache (if you
have this option) and then installing the "modperl" extensions.  If
you are able to do that, you can then use the CGI Perl module to
manage persistent data in a manner similar to ASP.

If you do not have the ability to install a web server, then you
probably will have to fall back on using Data::Dumper or some such
thing to explicitly manage your data persistence within CGI objects.

By the way, I heard that there is some sort of ASP extension that
works under Apache which (I *think*) is accessible via some sort
of Perl module.  If I can find out more about this, I'll contact
you ... or perhaps someone here knows about it.

> [ ... ]

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -le '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x"'


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

Date: 28 Oct 1998 01:50:57 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: persistent variables ?
Message-Id: <slrn73cu40.po0.sholden@pgrad.cs.usyd.edu.au>

On Tue, 27 Oct 1998 18:32:25 -0500, _Paul Coleman
	<Paul.Coleman@CoSeCo.com> wrote:
>Hi Daniel,
>I can only relate this to Microsoft ASP.  It seems to have provoked a mean
>streak in the group.  The Session and Application Object provide a way to
>save data on the server so that other pages that come from that site can
>retrieve the saved data.  The scope of the data is different in each of the
>objects.  Obviously the longer scope Session object would have to be used
>judiciously.  In concept, it is similar to a cookie but on the server and a
>predefined shorter scope or duration.  If I were to write such an
>application I would probably (and it looks like I will) write the data to a
>file as name value pairs with the Client IP address and a date time stamp.
>The IP address would allow identification and the time stamp would expire
>the data.

Except of course that multiple clients can have the same IP address when
dealing with things such as IP mascarading, possibly proxies (I'm not
sure if they pass on the real IP address somehow - they might), and
most definantly multi-user machines (such as out undergraduate machines
with probably 80+ users all running netscape at the same time from
the same IP.

There's also the problem of what is a reasonable timeout to use...

>This is a simple explanation, there are many other solutions ( I
>hope) But I am definitely looking for one in Perl.  I am also asking this
>question because at first  glance, the Perl community seems to share what
>they are doing and I was hoping someone else has already solved the
>problem.  I am learning that (and I hope it is restricted to this group)
>that it is loaded with tolerant challenged individuals that are reluctant to
>share any information and thrive of bashing the new people that drop by with
>cutting sarcasm.  I can only hope that it is isolated to here.
>Thanks for everything,

It might be better to pass a unique identifier to the client somehow so that
it passes it back to you with every request (a hidden form element, or a
cookie (if you must use such horrid things)). Then the server side can use 
that identifier to look up state information.

This is extremely insecure if that identifier is meant to be some
security token, however.

There is also :
Module id = CGI::Session
    DESCRIPTION  Maintain session/state information
    CPAN_USERID  MGH (Marc Hedlund <hedlund@best.com>)
    CPAN_VERSION undef
    DSLI_STATUS  cmpO (pre-alpha,mailing-list,perl,object-oriented)
    INST_FILE    (not installed)

Which isn't on CPAN but contacting the author might be worthwhile, if
only to see if you can contribute whatever you are about to do.

-- 
Sam

 "... the whole documentation is not unreasonably transportable in a
 student's briefcase." - John Lions describing UNIX 6th Edition
 "This has since been fixed in recent versions." - Kernighan & Pike


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

Date: Tue, 27 Oct 1998 21:22:01 -0500
From: "_Paul Coleman" <Paul.Coleman@CoSeCo.com>
Subject: Re: persistent variables ?
Message-Id: <363681a8.0@news3.paonline.com>

Because this is a Perl newsgroup.  What else would I be talking about?

Tk Soh wrote in message <363660CA.BB74F2EB@email.sps.mot.com>...
>_Paul Coleman wrote:
>
>> I think you don't understand my question.  I am asking a question that is
>> specific to Perl.  In Microsoft's ASP, two objects are provided as part
of
>
>This is your original post:
>-----------------------------------
>Hi,
>Is there a way to have persistent variables (or information) across Web
>Pages?
>Paul Coleman
>-----------------------------------
>
>Which part of you question is so specific to Perl, s/variables/Perl/ ?
>Well, maybe I should give up Perl and learn French instead.
>
>Microsoft ASP??? Perl???
>
>-tk




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

Date: Wed, 28 Oct 1998 13:04:12 +1300
From: Greg Ewing <greg@cosc.canterbury.ac.nz>
Subject: Re: psychology of language choice (was Re: language war ...)
Message-Id: <36365F7C.7D92@cosc.canterbury.ac.nz>

Uri Guttman wrote:
> 
> i would hate
> to do this in a language that forced OO like java and python.

Python doesn't "force" OO. It's quite possible to
write non-OO programs in Python.

-- 
Greg Ewing, Computer Science Dept, | The address below is not spam-
University of Canterbury,	   | protected, so as not to waste
Christchurch, New Zealand	   | the time of Guido van Rossum.
greg@cosc.canterbury.ac.nz


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

Date: Tue, 27 Oct 1998 18:04:37 -0800
From: "Tom Hill" <tjhill@flash.net>
Subject: USE declaration for modules in remote directories
Message-Id: <715u61$ftp$1@excalibur.flash.net>

I've tried many different variations of the syntax...

I've created a module that will not be run from a directory of the /perl
directory, but from a completely separate place.

I'm testing the module and scripts on ActiveState on Win95, but it will run
on a Solaris machine with the module in another remote directory.

docs, faqs, et. al. have not pointed me to the correct solution.

Say the module currently resides as:
c:\test\modules\samp\abc.pm

what would the proper use declare be for both ASPerl on '95 and on the
Solaris box?

BTW, the mod does and will reside in same dir as the related scripts using
it.

Thanks in advance!




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

Date: Wed, 28 Oct 1998 01:05:55 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: Using Window-target in HTTP header not outputting to correct frame in Internet Explorer
Message-Id: <1dhkvzh.e5prmjcc20wvN@isdn-gw.fischbach.seicom.net>

passme

<mattf@quicklink.com> wrote:

> Hi,
> 
> I've created a subroutine that should place its output into a target
> frame as specified.  The subroutine below is inside an nph-cgi script,
> and everything works fine when the client is Netscape.  In Explorer,
> the script outputs to the same frame.  If Explorer does not understand
> "Window-target", then what does it receive back when it makes requests
> that target frames?  Unfortunately I don't have the ability to capture
> http requests, or I could find out.  I would appreciate any help in
> this matter.  Thank you.

The best thing you could probably do is to ask this question in a CGI-
or IE newsgroup. There's close to nothing Perl could do to fix M$'s
weird implementation of targetting frames via meta-tags. (ooops, a hint,
sorry for trolling ;-)

hope this helps, HANW,

Joergen

F'ups set to comp.infosystems.authoring.cgi
-- 
  To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"


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

Date: 27 Oct 1998 15:36:44 -0900
From: Chris Lott <fncll@aurora.alaska.edu>
Subject: Which Perl for WIN NT server w IIS
Message-Id: <ypnemrtfroj.fsf@aurora.alaska.edu>


Subject about says it all: which Perl (distribution, not version) is 
most optimal for an NT box running IIS3 (soon to be 4)? I've seen comments
about at least three (Activestate, Swarathamy(sp), and another). 

It would mostly be used for handling web forms, discussion forums and 
perhaps some web database interaction, though I generally use Cold Fusion 
for that.
 
--
Chris Lott - fncll@uaf.edu
Instructional Technology Development Specialist
Rasmuson Library - 474-6350


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

Date: Tue, 27 Oct 1998 20:25:48 -0600
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Which Perl for WIN NT server w IIS
Message-Id: <363680AC.66B318DC@technologist.com>

I'd use ActivePerl.  G.S. will soon be working for them, if he already
isn't...

Brent
-- 
Java?  I've heard of it, it is what I drink while hacking Perl! -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$            Brent Michalski             $
$         -- Perl Evangelist --          $
$    E-Mail: perlguy@technologist.com    $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


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

Date: 28 Oct 1998 01:38:49 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Word Wrap
Message-Id: <slrn73ctd9.po0.sholden@pgrad.cs.usyd.edu.au>

On 27 Oct 1998 23:17:50 GMT, George H <george@tapestry.net> wrote:
<snip wanting to wrap lines problem>

>My approach has been to read each word from the textare into an array and
>make lines that are no greater than 63 before inserting my own hard return
>... but with other miscellaneous characters I am having a tough time.  Any
>suggestions
>
>George H
>georgeh@got.net

Doing a m/Wrap/ with CPAN.pm yielded :
Module          CGI::ErrorWrap  (Contact Author Tom Christiansen
	<tchrist@mox.perl.com>)
Module          CGI::Wrap       (MUIR/modules/CGI-Out-96.081401.tar.gz)
Module          EventServer::*Wrapper (Contact Author Jack Shirazi
	<JackS@GemStone.com>)
Module          IO::Wrap        (ERYQ/IO-stringy-1.203.tar.gz)
Module          IO::WrapTie     (ERYQ/IO-stringy-1.203.tar.gz)
Module          Penguin::Wrapper::PGP (FSG/Penguin-3.00.tar.gz)
Module          Penguin::Wrapper::Transparent (FSG/Penguin-3.00.tar.gz)
Module          Text::NWrap     (GABOR/Text-Format0.52+NWrap0.11.tar.gz)
Module          Text::Wrap      (GSAR/perl5.005_02.tar.gz)
Module          Text::WrapProp  (J/JB/JBRIGGS/Text-WrapProp-0.03.tar.gz)
Module          Text::Wrapper   (CJM/Text-Wrapper-1.000.tar.gz)

I'm positive one of those will do the job, most likely one of the
last four.

-- 
Sam

Perl was designed to be a mess (though in the nicest of possible ways). 
	--Larry Wall


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

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

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