[30341] in Perl-Users-Digest
Perl-Users Digest, Issue: 1584 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 28 11:09:43 2008
Date: Wed, 28 May 2008 08:09:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 28 May 2008 Volume: 11 Number: 1584
Today's topics:
automatic callback for leaving a sub-routine <FBergemann@web.de>
Re: FAQ 6.11 Can I use Perl regular expressions to matc <ben@morrow.me.uk>
Re: How do I handle an unknown number of keys to hash? <szrRE@szromanMO.comVE>
Re: How do I handle an unknown number of keys to hash? <1usa@llenroc.ude.invalid>
Maximize LWP https performance <ddp23@cam.ac.uk>
Re: Out of memory! Yet ... <alexxx.magni@gmail.com>
Re: Perldoc recommendation <joe@inwap.com>
Re: Perldoc recommendation <1usa@llenroc.ude.invalid>
Remove a tab with backspace? valerie.seigneur@googlemail.com
Using perl locally on a Windows XP system <bill@ts1000.us>
Re: Using perl locally on a Windows XP system <sean.prawn@gmail.com>
Re: Using perl locally on a Windows XP system <jurgenex@hotmail.com>
Re: Using perl locally on a Windows XP system <noreply@gunnar.cc>
Re: Using perl locally on a Windows XP system <sean.prawn@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 28 May 2008 08:06:40 -0700 (PDT)
From: Frank Bergemann <FBergemann@web.de>
Subject: automatic callback for leaving a sub-routine
Message-Id: <e9e993ca-f7fb-4788-aceb-12acc50055db@8g2000hse.googlegroups.com>
Hi,
i would like to automatically call a nested sub-routine A_exit(...)
for leaving sub-routine A(...).
In concrete to take care about "clean-up" for early exits.
OK, i could try to do w/o early exits (pls. don't start a
"philosophic" discussion about that :-)
In C++ i can use some RAII classes instead to take care about
automatic clean-up.
I don't know, if something like that is possible in perl as well(?) -
because here we use garbage collector.
I tried to use some local END { ... }.
But that didn't work as expected.
It was just invoked ( in addition to my global END { ...} ) at end of
program.
Is there a way to force a call-back invocation for leaving a sub-
routine?
- many thanks!
rgds
Frank
------------------------------
Date: Wed, 28 May 2008 09:08:00 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: FAQ 6.11 Can I use Perl regular expressions to match balanced text?
Message-Id: <0ggvg5-6m2.ln1@osiris.mauzo.dyndns.org>
Quoth PerlFAQ Server <brian@stonehenge.com>:
>
> 6.11: Can I use Perl regular expressions to match balanced text?
>
>
>
> x<recursion>
This should presumably be X<recursion>.
Ben
--
I touch the fire and it freezes me, [ben@morrow.me.uk]
I look into it and it's black.
Why can't I feel? My skin should crack and peel---
I want the fire back... BtVS, 'Once More With Feeling'
------------------------------
Date: Wed, 28 May 2008 01:15:37 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: How do I handle an unknown number of keys to hash?
Message-Id: <g1j4ba030lc@news4.newsguy.com>
Uri Guttman wrote:
>>>>>> "s" == szr <szrRE@szromanMO.comVE> writes:
>
> s> Jens Thoms Toerring wrote:
> >> grocery_stocker <cdalten@gmail.com> wrote:
> >>
> >> print exists $ages{c} ? $ages{c} : "NULL", "\n";
> >>
> >> This will print out "NULL" if no such key exists in the
> >> hash. But you may also want to print "NULL" if 'c' exists
> >> as a hash key but the corresponding value is undefined
> >> (otherwise you get the same warning but for a different
> >> reason). In that case you can use instead the also appro-
> >> riately named function defined():
> >>
> >> print defined $ages{c} ? $ages{c} : "NULL", "\n";
>
> s> 'defined' has the side effect of auto creating that key, so would
> it not
> s> be better to use something like,
>
> no it doesn't. accessing DEEP keys will autovivify higher level keys
> but nothing will autovivify when doing a top level access.
Ah, my mistake. I was thinking more along the lines of the behavior of
the "deep" keys. Must have gotten crossed up in my mind.
> s> print exists $ages{c} && defined $ages{c} ?
> s> $ages{c} : "NULL", "\n";
>
> s> to prevent that auto creation (if that is a concern to the
> beholder) ?
>
> not needed. exists and defined don't autovivify top level accesses. in
> fact they don't do anything special. it is the expression they work
> upon that may autovivify if the access is deeper. see my article on
> autovivification:
Yeah, I was thinking about the "deep" access behavior.
> http://sysarch.com/Perl/autoviv.txt
Noted, thanks.
> and someone posted the perl 5.10 solution of // which is nice if you
> can use 5.10.
Yep, nice and clean.
--
szr
------------------------------
Date: Wed, 28 May 2008 11:32:23 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How do I handle an unknown number of keys to hash?
Message-Id: <Xns9AAC4CB19D858asu1cornelledu@127.0.0.1>
grocery_stocker <cdalten@gmail.com> wrote in news:5391746b-9f63-4abf-
9f3e-435b6c614f24@j33g2000pri.googlegroups.com:
> On May 27, 9:28 am, nolo contendere <simon.c...@fmr.com> wrote:
>> On May 27, 12:24 pm, grocery_stocker <cdal...@gmail.com> wrote
>>
...
>> > Sometimes 'c' will appear in the list, but other times it won't. Ie
>> > sometimes I'll get
...
>> > This becomes an issue when I try to extract 'c' later on.
...
>> print $ages{c}, "\n" if exists $ages{c};
...
> Okay, but if the key doesn't exist, I still need to print out value.
If the key does not exist, there is no value to print.
> So if the key doesn't exist, can I then just insert the (key, value)
> pair back into %ages?
You cannot insert it "back" in because it did not exist in the first
place.
You ought to be able to come up with the following on your own
if key exists
do the appropriate thing for the case where the key exists
else
do the appropriate thing for the case where the key does not
exist
Now, the appropriate thing to do in the case they key does not exist
might be to insert the key into the hash with some default value but
*YOU* have to make that decision based on your own requirements.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: 28 May 2008 12:02:27 GMT
From: Daniel Parry <ddp23@cam.ac.uk>
Subject: Maximize LWP https performance
Message-Id: <slrng3qiej.hqn.ddp23@pip.srcf.ucam.org>
Hello,
I am attempting to load test an https web application using a
custom perl application. The order of requests made to the web
application is important so I can't just fire off all the requests
in parallel a la LWP::Parallel. So, my latest approach has been to
fork multiple times to achieve parallelism, with each fork
simulating a web application user. Via this technique I achieve a
sustained rate of about 12 requests / second which I feel, perhaps
incorrectly(?), that I should be able to improve upon.
I notice that some of the requests take an unusually long time to
complete. Seemingly unrelated to the web application server
responsiveness. Thus, I have two theories:
1) Contention over use of network. Requests are getting stacked up
at the mercy of the network scheduler.
I'm not entirely sure of a good way of confirming or disproving
this? It may be that splitting the execution across multiple hosts
is a way forward but I'd like to maximize performance on a single
host first before duplicating it across additional hosts...
2) SSL connection is biting.
Profiling a single process (no forking) suggests to me that a fair
bit of time is spent dealing with SSL connections.
%Time ExclSec CumulS #Calls sec/call Csec/c Name
78.0 1.970 1.970 180 0.0109 0.0109 Crypt::SSLeay::Conn::connect
8.16 0.206 0.206 114428 0.0000 0.0000 HTTP::Headers::_header
6.81 0.172 0.358 15674 0.0000 0.0000 Net::SSL::read
5.31 0.134 0.134 15674 0.0000 0.0000 Crypt::SSLeay::Conn::read
4.32 0.109 0.143 1854 0.0001 0.0001 HTML::Parser::parse
I am using keep alives:
my $userAgent = LWP::UserAgent->new( keep_alive=>1 );
So... I was wondering if anyone has done heavy load testing on
https sites via perl previously and could give me a few pointers
or hints please!
In fact, any help would be much appreciated!
Best wishes,
Daniel
------------------------------
Date: Wed, 28 May 2008 07:07:05 -0700 (PDT)
From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Re: Out of memory! Yet ...
Message-Id: <a78344ae-4a48-47cd-b0b5-7af6c2a1b833@56g2000hsm.googlegroups.com>
On 25 Mag, 01:58, s...@netherlands.co wrote:
> On Sat, 24 May 2008 13:44:51 -0700, s...@netherlands.co wrote:
> >On Fri, 23 May 2008 00:03:30 -0700 (PDT), "alexxx.ma...@gmail.com" <alexxx.ma...@gmail.com> wrote:
>
> >>thank you for your answer!
>
> >>On 22 Mag, 18:25, s...@netherlands.co wrote:
> >>> On Wed, 21 May 2008 23:32:52 -0700 (PDT), "alexxx.ma...@gmail.com" <alexxx.ma...@gmail.com> wrote:
> >>> >On 21 Mag, 18:11, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
> >>> >> "alexxx.ma...@gmail.com" <alexxx.ma...@gmail.com> wrote innews:e84cae72-e396-40a6-beec-4bad5aa3d615@d77g2000hsb.googlegroups.com:
>
> >>> --<snip>--
>
> >>> >> > The memory-eating line is this:
> >>> >> > for $i(1..$n)
> >>> >> > {
> >>> >> > for $y(1..$ny)
> >>> >> > { for $x(1..$nx) { $AAA[$i][$x][$y]=$a[3+$nx*($y-1)+$x] } }
> >>> >> > print("\n$i>\ttotal size: ",total_size($AAA));
> >>> >> > }
>
> >--<snip>--
>
> >>> "..since I have"
> >>> ">to process each pixel ($x,$y) along $i=1..$n "
>
> >>> Although a little confused, I thought this was interresting.
>
> >>> You made some statements along with including this code:
>
> >>> for $i(1..$n)
> >>> {
> >>> for $y(1..$ny)
> >>> {
> >>> for $x(1..$nx)
> >>> {
> >>> $AAA[$i][$x][$y]=$a[3+$nx*($y-1)+$x]
> >>> }
>
> >>> }
>
> >>> You said you are reading 100 gray scale images into @a,
> >>> flat file. Since the indices of $AAA never touch the same
> >>> element twice as an lvalue and since $AAA is never referenced
> >>> as an rvalue. This merely rearranges the values of @a into @AAA.
> >>> I am not sure this is a filter or even a conversion of say color to gray.
>
> >>well, as I said before, I didnt want to post a script too large to the
> >>group, so maybe I've been misunderstood: the images are read in
> >>sequence in @a, so that @a is overwritten each time - no memory waste
> >>there: it will just occupy between 2 and 15MB as you said. $AAA
> >>instead will hold all of them, and I'm unable to avoid this.
>
> >>A little background: the images are a temporal sequence of
> >>magnetooptical images representing the switching of magnetization, say
> >>from black to white, along time. This meas.tech. is very noisy. The
>
> >--<snip>-- I'll take your word on it ..
>
> >>Sorry if I didnt explain it before.
>
> >>> Lets do a little bitmap math.
>
> >>> Assume memory conservation:
> >>> 1600 x 1200 pixels x 1 byte/8-bit(plane's) gray scale = 1.9 MB
> >>> 100 gray scale images x 1.9 MB/image = 190 MB
> >>> Using 2 buffers = 380 MB
>
> >>> Assume memory waste:
> >>> 1600 x 1200 pixels x 8 byte/8-bit(plane's) gray scale = 15.36 MB
> >>> 100 gray scale images x 15.36 MB/image = 1.536 GB
> >>> Using 2 buffers = 3.072 GB
>
> >>I didnt understand well: memory conservation vs, waste, how can I be
> >>sure in perl that I use in my matrices 1 byte per pixel? I believed
> >>that perl automatically choose by itself, and it was impossible to
> >>force "byte ($x,$y,$z)" in C-style.
>
> >>Thanks again!
>
> >> Alessandro
>
> >In what your doing, memory conservation becomes important.
> >According to perldoc's, the default scalar number is a float.
> >And if you use bit-wise operations, the default integral type
> >is unsigned int. If you include "use integer" the default becomes
> >signed int. I don't know if or how that affects internal buffering of
> >number arrays, since arrays can hold a mixture of any perl type,
> >which would tend to use a large amount of memory resources.
>
> >However that affects your program, it affects everybody's the same way
> >and is uncontrollable. But the compiler does funny optimizations.
>
> >So the only thing you can do is to try to maximize space ala C-style,
> >and see what that gives you. If it doesen't work, no loss, try something
> >else.
>
> >I don't know how you are reading in the bitmap so I'm just guessing on this.
> >After looking at this equation $AAA[$i][$x][$y] = $a[3+$nx*($y-1)+$x];
> >it appears to be reading bytes, plus you mentioned 8-bit gray scale.
> >A byte is 8 bits so that makes sense.
>
> >And there does seem to be an ordering to it that resembles bit plane's,
> >in the y direction, so I'll just leave it for what it is.
>
> >This ordering can be seen in this series:
> >for y=1..1600
> >{
> > for x=1..1200
> > { AAA[x][y] = a[3 + 1200*(y-1) + x] }
> >}
>
> >x=1..1200, y=1
> >-------------------
> >AAA[1][1] = a[3 + 1200*(1-1) + 1] = a[4]
> >AAA[2][1] = a[3 + 1200*(1-1) + 2] = a[5]
> >AAA[3][1] = a[3 + 1200*(1-1) + 3] = a[6]
> >AAA[1200][1] = a[3 + 1200*(1-1) + 1200] = a[1203]
>
> >x=1..1200, y=2
> >-------------------
> >AAA[1][2] = a[3 + 1200*(2-1) + 1] = a[1204]
> >AAA[2][2] = a[3 + 1200*(2-1) + 2] = a[1205]
> >AAA[3][2] = a[3 + 1200*(2-1) + 3] = a[1206]
> >AAA[1200][2] = a[3 + 1200*(2-1) + 1200] = a[2403]
>
> >Back to bitmap math, assume memory conservation:
> >1600 x 1200 pixels x 1 byte gray scale = 1.9 MB
>
> >The ideal situation is if you could use a block of memory
> >where every byte contained valid 8-bit color data.
>
> >Right now, it appears you are using a 32-bit element to
> >store an 8-bit color, wasting 3 bytes each time.
> >This is alright though. Its the way it is stored in the frame buffer,
> >and is enough room to hold a 24-bit color.
>
> >Since your doing image processing though, it might be a
> >good idea to use the remaining 3 byte's in each element.
>
> >In the example above, using all 4 byte's of the element
> >should only consume 1.9 MB.
>
> >A byte array can be simulated in the untested example below.
> >Note, that this can be done for 16-bit color as well.
> >Nothing beyond that though.
>
> >Acording to the perldoc's, bit manipulations should be fast
> >as they are close to C at low level.
>
> >sln
> >robic0(at)adelphia.net
>
> >Untested example:
>
> >@a = ();
> >@AAA = ();
>
> >for $i(1..$n)
> >{
> > # ... read another bitmap into $a
> > # ...
>
> > for $y(1..$ny)
> > {
> > for $x(1..$nx)
> > {
> > setColor8(\@AAA, $i, $x, $y, $a[3 + $nx*($y-1) + $x]);
> > ## $AAA[$i][$x][$y] = $a[3+$nx*($y-1)+$x];
> > }
> > }
>
> > }
>
> >sub setColor8
> >{
> > my ($refimgarray, $img, $xpixel, $ypixel, $color) = @_
> > my $bitpos = ($ypixel & 3) * 8;
> > my $yelement = (($ypixel & 0xFFFFFFFB) >> 2) + 1;
> > my $refelement = \${$refimgarray}[$img][$xpixel][$yelement];
> > $$refelement = (($$refelement & ~(0xFF << $bitpos)) | (($color & 0xFF) << $bitpos)));
> >}
>
> >sub getColor8
> >{
> > my ($refimgarray, $img, $xpixel, $ypixel) = @_
> > my $bitpos = ($ypixel & 3) * 8;
> > my $yelement = (($ypixel & 0xFFFFFFFB) >> 2) + 1;
> > my $refelement = \${$refimgarray}[$img][$xpixel][$yelement];
> > return (($$refelement & (0xFF << $bitpos)) >> $bitpos);
> >}
>
> sub setColor16
> {
> my ($refimgarray, $img, $xpixel, $ypixel, $color) = @_;
> my $bitpos = ($ypixel & 1) * 16;
> my $yelement = (($ypixel & 0xFFFFFFFE) >> 1) + 1;
> my $refelement = \${$refimgarray}[$img][$xpixel][$yelement];
> $$refelement = (($$refelement & ~(0xFFFF << $bitpos)) | (($color & 0xFFFF) << $bitpos)));
>
> }
>
> sub getColor16
> {
> my ($refimgarray, $img, $xpixel, $ypixel, $color) = @_;
> my $bitpos = ($ypixel & 1) * 16;
> my $yelement = (($ypixel & 0xFFFFFFFE) >> 1) + 1;
> my $refelement = \${$refimgarray}[$img][$xpixel][$yelement];
> return (($$refelement & (0xFFFF << $bitpos)) >> $bitpos);
>
> }
>
> ===================================
> alternate:
>
> setColor8($AAA[$i][$x], $y, $a[3 + $nx*($y-1) + $x]);
>
> sub setColor8
> {
> my ($refxpixel, $ypixel, $color) = @_;
> my $bitpos = ($ypixel & 3) * 8;
> my $yelement = (($ypixel & 0xFFFFFFFB) >> 2) + 1;
> my $refelement = \${$refxpixel}[$yelement];
> $$refelement = (($$refelement & ~(0xFF << $bitpos)) | (($color & 0xFF) << $bitpos)));
>
> }
>
> sub getColor8
> {
> my ($refxpixel, $ypixel) = @_;
> my $bitpos = ($ypixel & 3) * 8;
> my $yelement = (($ypixel & 0xFFFFFFFB) >> 2) + 1;
> my $refelement = \${$refxpixel}[$yelement];
> return (($$refelement & (0xFF << $bitpos)) >> $bitpos);
>
> }
>
> sub setColor16
> {
> my ($refxpixel, $ypixel, $color) = @_;
> my $bitpos = ($ypixel & 1) * 16;
> my $yelement = (($ypixel & 0xFFFFFFFE) >> 1) + 1;
> my $refelement = \${$refxpixel}[$yelement];
> $$refelement = (($$refelement & ~(0xFFFF << $bitpos)) | (($color & 0xFFFF) << $bitpos)));
>
> }
>
> sub getColor16
> {
> my ($refxpixel, $ypixel) = @_;
> my $bitpos = ($ypixel & 1) * 16;
> my $yelement = (($ypixel & 0xFFFFFFFE) >> 1) + 1;
> my $refelement = \${$refxpixel}[$yelement];
> return (($$refelement & (0xFFFF << $bitpos)) >> $bitpos);
>
> }
Thanks a lot for your help, that's what I needed!
Here is the result from top of the memory occupation on my system
(176 pgm images, 2.1MB each):
without byte array simulation: 82.5% MEM
with byte array simulation: 8% MEM !!!!!
It is certainly slower to process (dont know exactly how much, I didnt
timed), but now memory space is used soooooo better!
THANK YOU!
Alessandro
------------------------------
Date: Wed, 28 May 2008 03:26:53 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Perldoc recommendation
Message-Id: <2O2dnSF-2f3trqDVnZ2dnUVZ_sWdnZ2d@comcast.com>
Marc Bissonnette wrote:
> While perl is installed locally,
> Microsoft decided brilliantly (!!!) to make the DOS box only open in a
> narrow window
Feh! I've installed cygwin on all my Windows machines, so I get a real
command line window with proper cut-and-paste and full resize.
With tcsh (or bash) in an rxvt window eliminates the need for CMD.EXE.
-Joe
------------------------------
Date: Wed, 28 May 2008 11:36:57 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Perldoc recommendation
Message-Id: <Xns9AAC4D778A13Easu1cornelledu@127.0.0.1>
Marc Bissonnette <dragnet\_@_/internalysis.com> wrote in
news:Xns9AABC7E394129dragnetinternalysisc@216.196.97.131:
> Jürgen Exner <jurgenex@hotmail.com> fell face-first on the keyboard.
> This was the result: news:b3em3493oqdc765a223qvce7fi9em5r6vq@4ax.com:
>
>> Marc Bissonnette <dragnet\_@_/internalysis.com> wrote:
>>> Sadly, my machine here is Windows Vista (Yes, I know - boneheaded)
>>>... Microsoft decided brilliantly (!!!) to make the DOS box only
>>>open in a narrow window - For someone who's eyesight isn't what it
>>>used to be, this doesn't make for great long content reading :(
>>
>> May Vista be good or bad, it always amuses me how people love to
>> participate in Microsoft bashing using arguments that tell more about
>> their (lack of) intelligence than about the Microsoft product in
>> question:
...
> Well, as mean-spirited as that response was - it was correct and I
> have indeed learned something new - for that, thank you.
It is not mean spiritied to point out the stupidity of someone who is
accusing others of the same.
Those three exclamation points next to "brilliantly" in your original
post means you thought Microsoft's design decision was stupid when in
reality it was your own ignorance and willingness to blame other people
for the same that was the reason for your issues.
> What you *got* out of being a crotchety old fart in that <shrug> Hope
> it makes you feel the bigger person.
Hope it makes you feel like a bigger person to put down other people's
work.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Wed, 28 May 2008 08:05:54 -0700 (PDT)
From: valerie.seigneur@googlemail.com
Subject: Remove a tab with backspace?
Message-Id: <a95c5c49-148c-4a6a-891c-85e7c4f7c27a@d45g2000hsc.googlegroups.com>
Hi,
I'd like to use "\b" to delete a tab character, but it doesn't seem to
work. I've found several posts about the backspace character, but none
about this particular problem.
perl -e 'print "AB\bC\n";'
works fine and prints "AC", but
perl -e 'print "A\t\bC\n";'
prints "A-tab-C".
This is the simplified version, of course. In my script the extra tab
is there because I'm printing a tab each time I go through a loop, but
at the last iteration, I actually want a new line there, so I want to
get rid of the tab character and replace it with "\n".
Is this a problem with my perl code or with Apple's X11?
Val
------------------------------
Date: Wed, 28 May 2008 04:11:23 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Using perl locally on a Windows XP system
Message-Id: <6ab8640b-5582-4edf-b1db-f38fa99b1cc5@e53g2000hsa.googlegroups.com>
This is not particullary a perl question but applies. I do all my perl
development on a XP system and then u/l it to a linux server in my
office for testing the perl code with browser interfaces or flash
interfaces. What I would like to do is setup the XP system so I can
run the perl locally. For example, with the flash programs I write you
are not allowed to cross domains, so the flash file must reside on the
same system as the perl (cgi) that it communicates with. Since this is
the case I can not run these flash files within the developer and have
all the debugging features.
So my question is, how do I setup the XP system to act as a server
locally so that the perl code will execute as cgi. Any clues -
pointers - links are appreciated.
I hope I am explaining this right, I am sure there are a number of you
who have already set their system to do this.
Bill H
------------------------------
Date: Wed, 28 May 2008 12:24:09 +0100
From: prawn <sean.prawn@gmail.com>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <pvrvg5-3le.ln1@prawn.mine.nu>
On Wed, 28 May 2008 04:11:23 -0700, Bill H wrote:
> This is not particullary a perl question but applies. I do all my perl
> development on a XP system and then u/l it to a linux server in my
> office for testing the perl code with browser interfaces or flash
> interfaces. What I would like to do is setup the XP system so I can run
> the perl locally. For example, with the flash programs I write you are
> not allowed to cross domains, so the flash file must reside on the same
> system as the perl (cgi) that it communicates with. Since this is the
> case I can not run these flash files within the developer and have all
> the debugging features.
>
> So my question is, how do I setup the XP system to act as a server
> locally so that the perl code will execute as cgi. Any clues - pointers
> - links are appreciated.
>
> I hope I am explaining this right, I am sure there are a number of you
> who have already set their system to do this.
>
> Bill H
Here: <http://www.indigostar.com/indigoperl.htm>
I haven't done perl web development in a windows environment for some
time but this worked out of the box when I did. It will install apache,
Perl and PHP.
The alternative is to install activestate perl, apache and mod_perl.
--
p BotM#1 LotR#9
http://www.last.fm/user/prawnuk
------------------------------
Date: Wed, 28 May 2008 13:50:31 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <5goq341uf3s3okbdca02ie7il826e5j4kk@4ax.com>
Bill H <bill@ts1000.us> wrote:
>This is not particullary a perl question but applies. I do all my perl
>development on a XP system and then u/l it to a linux server in my
>office for testing the perl code with browser interfaces or flash
>interfaces. What I would like to do is setup the XP system so I can
>run the perl locally.
That is trivial. A very popular system for that is ActiveState Perl.
>So my question is, how do I setup the XP system to act as a server
>locally so that the perl code will execute as cgi. Any clues -
>pointers - links are appreciated.
Oh, you are not talking about Perl at all, you are talking about an HTTP
server. The "best" way to do that is to install a proxy server, which
redirects all requests to your test environment, in this case to
localhost.
jue
------------------------------
Date: Wed, 28 May 2008 16:05:33 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <6a5720F35tgt8U1@mid.individual.net>
prawn wrote:
> On Wed, 28 May 2008 04:11:23 -0700, Bill H wrote:
>> how do I setup the XP system to act as a server
>> locally so that the perl code will execute as cgi.
>
> Here: <http://www.indigostar.com/indigoperl.htm>
>
> I haven't done perl web development in a windows environment for some
> time but this worked out of the box when I did.
It still does.
> It will install apache, Perl and PHP.
The latest bundle includes Perl 5.10.0, not 5.8.10 as the web site states.
I do recommend it. There is probably no easier way available to set up a
box on Windows for web development.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 28 May 2008 15:51:56 +0100
From: prawn <sean.prawn@gmail.com>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <c580h5-3le.ln1@prawn.mine.nu>
On Wed, 28 May 2008 16:05:33 +0200, Gunnar Hjalmarsson wrote:
> prawn wrote:
>>
>> Here: <http://www.indigostar.com/indigoperl.htm>
>>
>> I haven't done perl web development in a windows environment for some
>> time but this worked out of the box when I did.
>
> It still does.
Good, good.
>> It will install apache, Perl and PHP.
>
> The latest bundle includes Perl 5.10.0, not 5.8.10 as the web site
> states.
>
> I do recommend it. There is probably no easier way available to set up a
> box on Windows for web development.
AOL. It just worked.
--
p BotM#1 LotR#9
http://www.last.fm/user/prawnuk
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1584
***************************************