[30358] in Perl-Users-Digest
Perl-Users Digest, Issue: 1601 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 1 21:09:46 2008
Date: Sun, 1 Jun 2008 18:09:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 1 Jun 2008 Volume: 11 Number: 1601
Today's topics:
$# array creation and data rotation <hobart@doitsweb.net>
Re: $# array creation and data rotation (Jens Thoms Toerring)
Re: $# array creation and data rotation <abigail@abigail.be>
Re: $# array creation and data rotation <someone@example.com>
Re: changing the value of "case" in a switch statement <ben@morrow.me.uk>
Re: Need help with a simple (I think) Perl script sln@netherlands.co
Re: One of thos d'uh moments <someone@example.com>
Re: One of thos d'uh moments <tadmc@seesig.invalid>
Re: One of thos d'uh moments <ben@morrow.me.uk>
Re: OT: SI units (was sorting a hash / 2008-06-01) <danrumney@77617270mail.net>
Re: OT: SI units (was sorting a hash / 2008-06-01) <jurgenex@hotmail.com>
Re: Python's doc problems: sort <szrRE@szromanMO.comVE>
Re: Speed comparison of regex versus index, lc, and / / <ced@blv-sam-01.ca.boeing.com>
Re: The Importance of Terminology's Quality <arne@vajhoej.dk>
Re: Using perl locally on a Windows XP system <bill@ts1000.us>
Re: Using perl locally on a Windows XP system <noreply@gunnar.cc>
Re: Using perl locally on a Windows XP system <jurgenex@hotmail.com>
Re: Using perl locally on a Windows XP system <bill@ts1000.us>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 01 Jun 2008 13:28:09 -0800
From: Hobart Duncan <hobart@doitsweb.net>
Subject: $# array creation and data rotation
Message-Id: <4g364418oe5dngfahci3j1cu980a89q2gq@4ax.com>
This newbie need some technical information:
....after the creation of an array of (just for grins..) 10 integers read in
from (more grins....) the serial port, what is the proper way to maintain the
array to ONLY 10 values?
I want to first create an array: .... $#Test = sprintf (%d, 100/10)
now, as data comes in via the serial port (I keeping everything in decimal) I
first want to "shift" the data: shift (@Test)
and then push the new data: push (@Test, newdata).
After the new data is inserted, I perform calculations (averages, etc) and then
move on..... until the next loop when the shift and push are executed again.
Because I am not using the shifted data, does the shift statement just pull the
data and throw it away? .... and is this a safe way to rotate the data within
the array?
Tnx, in advance....
Hobart
------------------------------
Date: 1 Jun 2008 21:52:07 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: $# array creation and data rotation
Message-Id: <6agk07F3651mfU1@mid.uni-berlin.de>
Hobart Duncan <hobart@doitsweb.net> wrote:
> ....after the creation of an array of (just for grins..) 10 integers read
> in from (more grins....) the serial port, what is the proper way to
> maintain the array to ONLY 10 values?
> I want to first create an array: .... $#Test = sprintf (%d, 100/10)
That creates an array with 11 undefined elements. I though you wanted
an array with 10 elements, didn't you? Remember '$#Test' is the index
of the last element and you set it to 10. And the index of the first
element is 0.
> now, as data comes in via the serial port (I keeping everything in
> decimal) I first want to "shift" the data: shift (@Test) and then push the
> new data: push (@Test, newdata).
> After the new data is inserted, I perform calculations (averages, etc) and
> then move on..... until the next loop when the shift and push are executed
> again.
> Because I am not using the shifted data, does the shift statement just
> pull the data and throw it away? .... and is this a safe way to rotate the
> data within the array? >
Yes, it's completely ok. shift() removes the first element from the
array and returns it as it's return value. You can do with that value
whatever you like, throwing it away by mot assigning it to anything is
one of your options. And push() appends a new value (or, if you pass
it more than a single value, all those values) to the array. Also here
everything you claim to do looks fine.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
------------------------------
Date: 01 Jun 2008 22:01:06 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: $# array creation and data rotation
Message-Id: <slrng46711.6ns.abigail@alexandra.abigail.be>
_
Hobart Duncan (hobart@doitsweb.net) wrote on VCCCLXXXVIII September
MCMXCIII in <URL:news:4g364418oe5dngfahci3j1cu980a89q2gq@4ax.com>:
,, This newbie need some technical information:
,,
,, ....after the creation of an array of (just for grins..) 10 integers read in
,, from (more grins....) the serial port, what is the proper way to maintain th
,, array to ONLY 10 values?
"The proper way"? Are you sure you wanted to ask that question in a *Perl*
group? You know, the language with more ways to do it?
If you want a language with "proper" ways of doing certain things, you
might try Python. (Or you could ask the question in Perlmonks, but I'd
prefer Python myself).
,,
,, I want to first create an array: .... $#Test = sprintf (%d, 100/10)
,,
,, now, as data comes in via the serial port (I keeping everything in decimal)
,, first want to "shift" the data: shift (@Test)
,,
,, and then push the new data: push (@Test, newdata).
,,
,, After the new data is inserted, I perform calculations (averages, etc) and t
,, move on..... until the next loop when the shift and push are executed again.
,,
,, Because I am not using the shifted data, does the shift statement just pull
,, data and throw it away? .... and is this a safe way to rotate the data withi
,, the array?
shifting and pushing are quite normal ways of removing an element from
an array, or adding an element to an array. In fact, that's the *only*
use of such functions.
There's an other way, without using arrays: store the elements in a hash:
my $count = 0;
my %Test;
while (defined (my $element = Universe -> something)) {
$Test {$count ++ % 10} = $element;
... do whatever with values %Test ...
}
Once you've inserted 10 elements, %Test will hold 10 elements, never
more, and each time you add another element, the element that's in there
longest will be removed.
Abigail
--
perl -le 's[$,][join$,,(split$,,($!=85))[(q[0006143730380126152532042307].
q[41342211132019313505])=~m[..]g]]e and y[yIbp][HJkP] and print'
------------------------------
Date: Sun, 01 Jun 2008 23:47:48 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: $# array creation and data rotation
Message-Id: <EyG0k.431$7B3.142@edtnps91>
Abigail wrote:
> _
> Hobart Duncan (hobart@doitsweb.net) wrote on VCCCLXXXVIII September
> MCMXCIII in <URL:news:4g364418oe5dngfahci3j1cu980a89q2gq@4ax.com>:
> ,, This newbie need some technical information:
> ,,
> ,, I want to first create an array: .... $#Test = sprintf (%d, 100/10)
> ,,
> ,, now, as data comes in via the serial port (I keeping everything in decimal)
> ,, first want to "shift" the data: shift (@Test)
> ,,
> ,, and then push the new data: push (@Test, newdata).
> ,,
> ,, After the new data is inserted, I perform calculations (averages, etc) and t
> ,, move on..... until the next loop when the shift and push are executed again.
> ,,
> ,, Because I am not using the shifted data, does the shift statement just pull
> ,, data and throw it away? .... and is this a safe way to rotate the data withi
> ,, the array?
>
>
> shifting and pushing are quite normal ways of removing an element from
> an array, or adding an element to an array. In fact, that's the *only*
> use of such functions.
>
> There's an other way, without using arrays: store the elements in a hash:
>
> my $count = 0;
> my %Test;
>
> while (defined (my $element = Universe -> something)) {
> $Test {$count ++ % 10} = $element;
> ... do whatever with values %Test ...
> }
>
> Once you've inserted 10 elements, %Test will hold 10 elements, never
> more, and each time you add another element, the element that's in there
> longest will be removed.
The same thing would work with an array:
$Test[ $count++ % 10 ] = $element;
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Mon, 2 Jun 2008 00:52:55 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: changing the value of "case" in a switch statement
Message-Id: <nbpbh5-n94.ln1@osiris.mauzo.dyndns.org>
Quoth Bill H <bill@ts1000.us>:
> When using the switch / case construct I have found it necessary
> (desirable?) to be able to change the "case" on the fly. For example
> (this is a typed in example, not the true code):
>
> switch ($action)
Don't use Switch.pm. It is buggy, and if you happen to tickle one of its
bugs it can do *very* weird things to your code. If you really feel you
need a switch statement, upgrade to 5.10 and use given/when; otherwise,
use one of the constructions listed in perldoc -q switch.
> {
> case "save"
> {
> # save the new information
> $action = "list"; # show them all the information available
> including what was just saved using the next case
> }
> case "list"
> {
> # list the information available
> }
> }
I would write this with a dispatch table, something like
my @todo;
my %dispatch = (
save => sub {
# save the new information
push @todo, 'list';
},
list => sub {
# list the information available
},
);
@todo = ($action);
$dispatch{shift @todo}->() while @todo;
This gives you the ability to do a whole list of other states 'next'.
Ben
--
And if you wanna make sense / Whatcha looking at me for? (Fiona Apple)
* ben@morrow.me.uk *
------------------------------
Date: Sun, 01 Jun 2008 16:20:21 -0700
From: sln@netherlands.co
Subject: Re: Need help with a simple (I think) Perl script
Message-Id: <lcb6445nle52qhirvljo9h66vcgu56p2qg@4ax.com>
On 31 May 2008 02:44:07 GMT, xhoster@gmail.com wrote:
>sln@netherlands.co wrote:
>> On 30 May 2008 18:44:40 GMT, xhoster@gmail.com wrote:
>> >> Ben Bullock wrote:
>> >> >
>> >> > One can look for the messages produced by "die" in the error log
>> >> > too, and if the code is in use by people other than the CGI
>> >> > programmers (which it probably will be) it's probably a better bet
>> >> > to not use the above outside of testing, since it will produce
>> >> > something meaningless and confusing.
>> >
>> >I wouldn't find it meaningless and confusing. It is quite clear that an
>> >error has occurred, that is neither meaningless nor confusing. It gives
>> >extra information, but I think I (being hypothetically not a CGI
>> >programmer) would know enough to expect that this is meaningful to
>> >someone else, if not to me, and that if I wish to discuss the error with
>> >that someone else, it might be helpful to quote parts of it to them, so
>> >in that way it is meaningful as well as not confusing.
>> >
>>
>> But, YOU won't be there.
>
>I won't be where?
>
You not there and never will be.
>
>> The whole idea is programmed error recovery.
>
>Presumably we've already tried that to the extent it can be done. Simple
>errors that can be recovered should of course be recovered. But many
>errors can't be recovered. If if a file that is critical can't be
>accessed, or if a database that is critical cannot be connected to, then
>there is no recovery to be done. Pretending otherwise is not error
>recovery, it is just launching an infinitude of crap in which you refuse to
>acknowledge the existence of a problem which obviously does exist.
>
I guess the customer will not pretend an understanding of your frustration.
>> To just die, unless you can't recover is not an option in the corporate
>> world. Built in recovery algo's are manditory in the money world.
>
>My paycheck never seems to bounce, so the world I live in seems to be money
>world.
>
I doubt seriously if employment is of any concern to you.
sln
------------------------------
Date: Sun, 01 Jun 2008 23:41:34 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: One of thos d'uh moments
Message-Id: <OsG0k.430$7B3.320@edtnps91>
Bill H wrote:
> For years I have always done various versions the following (and I
> know there is probably some perlish way of doing it better, but old
> habits die hard) to go through a list of data and build a string that
> contains only certain matched data:
>
> $stuff = "":
> foreach $temp (@dbf)
> {
> @rbf = split(/\t/,$temp);
> if($rbf[0] == 0)
> {
> $stuff .= $temp."|";
> }
> }
> $stuff = substr($stuff,0,length($stuff) - 1);
>
> But I just realized about 5 minutes ago instead of pulling off the
> last usless "|" I could just replace $stuff = ""; with stuff = "|";
> and the last line with: $stuff = substr($stuff,1);
>
> And, while typing this I just realized I could do the above even
> better:
>
> foreach $temp (@dbf)
> {
> @rbf = split(/\t/,$temp);
> if($rbf[0] == 0)
> {
> $cbf[@cbf] = $temp
> }
> }
> $stuff = join('|',@cbf);
>
> I am willing to bet now there is a one line command that would do all
> this.
$stuff = join '|', grep 0 == ( split /\t/ )[ 0 ], @dbf;
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Sun, 1 Jun 2008 16:56:48 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: One of thos d'uh moments
Message-Id: <slrng466p0.aql.tadmc@tadmc30.sbcglobal.net>
Bill H <bill@ts1000.us> wrote:
> Subject: One of thos d'uh moments
Please put the subject of your article in the Subject of your article.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Mon, 2 Jun 2008 01:22:16 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: One of thos d'uh moments
Message-Id: <o2rbh5-er5.ln1@osiris.mauzo.dyndns.org>
Quoth Bill H <bill@ts1000.us>:
>
> foreach $temp (@dbf)
> {
> @rbf = split(/\t/,$temp);
> if($rbf[0] == 0)
> {
> $cbf[@cbf] = $temp
> }
> }
> $stuff = join('|',@cbf);
join '|',
map { join "\t", @$_ }
grep $_->[0] == 0,
map [split /\t/],
@dbf;
is the obvious translation. Of course, now we're joining on "\t" when we
didn't need to; if that were a worry you could do
join '|',
map $_->[0],
grep $_->[1][0] == 0,
map [$_, [split /\t/]],
@dbf;
but I'd consider the first less obscure. Using List::MoreUtils you could
do something like
join '|', @dbf[
indexes { $_->[0] == 0 }
map [split /\t/],
@dbf
];
or even
join '|', @dbf[
indexes { $_ == 0 }
map { (undef) = split /\t/ }
@dbf
];
Ben
--
"If a book is worth reading when you are six, * ben@morrow.me.uk
it is worth reading when you are sixty." [C.S.Lewis]
------------------------------
Date: Sun, 01 Jun 2008 20:04:53 -0400
From: Dan Rumney <danrumney@77617270mail.net>
Subject: Re: OT: SI units (was sorting a hash / 2008-06-01)
Message-Id: <48433932$0$4260$4c368faf@roadrunner.com>
> Excuse me, but is it really absolutely unthinkable to share your
> information with the meager 99% percent of the world that has adopted
> SI units decades(!) ago?
>
> https://www.cia.gov/library/publications/the-world-factbook/appendix/appendix-g.html
Since the US uses Fahrenheit for its temperatures and these are all US
cities, then Fahrenheit does seem like an appropriate choice, don't you
think?
Also, since the script is clearly about the average temperature with
regards to the weather, the choice of units is hardly a *critical* one
and so widespread local convention would seem to be the sensible choice.
------------------------------
Date: Mon, 02 Jun 2008 00:27:19 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: OT: SI units (was sorting a hash / 2008-06-01)
Message-Id: <tqe6449ql59hl37drbv9t7f1bi0hn0pslj@4ax.com>
Dan Rumney <danrumney@77617270mail.net> wrote:
>> Excuse me, but is it really absolutely unthinkable to share your
>> information with the meager 99% percent of the world that has adopted
>> SI units decades(!) ago?
>>
>> https://www.cia.gov/library/publications/the-world-factbook/appendix/appendix-g.html
>
>Since the US uses Fahrenheit for its temperatures and these are all US
>cities, then Fahrenheit does seem like an appropriate choice, don't you
>think?
Well, very much depends on your target audience. If you never ever will
use that program/that data outside of the Fahrenheit enclave, then using
Fahrenheit is quite acceptable.
However if there is even the tiniest chance that this program/this data
is ever to be used outside of the Fahrenheit island then you should
consider international standards right from the beginning. Believe me,
de-localizing code and making it global is a _MAJOR_ pain. It is much
worse than writing globalized code right from the get-go. Been there,
done that for many years.
>Also, since the script is clearly about the average temperature with
>regards to the weather, the choice of units is hardly a *critical* one
>and so widespread local convention would seem to be the sensible choice.
'Widespread' and 'local' is kind of a contradiction ;-))
jue
------------------------------
Date: Sun, 1 Jun 2008 14:49:42 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: Python's doc problems: sort
Message-Id: <g1v5hn02589@news4.newsguy.com>
Jürgen Exner wrote:
> "Andrew Koenig" <ark@acm.org> wrote:
>> <xahlee@gmail.com> wrote in message
>
> [Subject: Python's doc problems: sort]
>>> I want to emphasize a point here, as i have done quite emphatically
>>> in the past. The Python documentation, is the world's worst
>>> technical
>
> And WTF does Python documentation have to do with Perl of Lisp?
>
> szr, do you still have any doubts about the nature of xahlee?
I wasn't involved in this thread, but no, after that statement comparing
Perl's and Python's docs, I no doubts.
--
szr
------------------------------
Date: Sun, 1 Jun 2008 16:03:36 -0700 (PDT)
From: "comp.llang.perl.moderated" <ced@blv-sam-01.ca.boeing.com>
Subject: Re: Speed comparison of regex versus index, lc, and / /i
Message-Id: <35bcba63-f7d1-4f93-ae5d-bf65b048a5d0@u6g2000prc.googlegroups.com>
On May 31, 8:14 am, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth abig...@abigail.be:
>
>
>
> > Ben Morrow (b...@morrow.me.uk) wrote on VCCCLXXXVII September MCMXCIII in
> > <URL:news:mas6h5-nt11.ln1@osiris.mauzo.dyndns.org>:
> > ""
> > "" Note that m// will only use the precompiled form of the qr// if the
> > "" $rx is the only thing in the match. Something like /^$rx/ or
> > "" /$rx1|$rx2/ or even / $rx/x will cause the regex to be recompiled
> > "" every time all over again.
>
> > That hasn't been the case for over a decade or so:
>
> > perl -Mre=debug -wE '$re = qr /foo/;
> > for (qw [bar baz]) {/ $re/}' 2>&1| grep '^Compiling'
> > Compiling REx "foo"
> > Compiling REx " (?-xism:foo)"
>
> > It only compiles twice, once for the qr //, and once for the m //.
>
> You know, I did actually test that :).
>
> ~% perl -Mre=debug -e'$qr=qr/a/; /$qr/' 2>&1 | grep Comp
> Compiling REx `a'
> ~% perl -Mre=debug -e'$qr=qr/a/; / $qr/x' 2>&1 | grep Comp
> Compiling REx `a'
> Compiling REx ` (?-xism:a)'
>
> If it's actually using the compiled form of the qr//, it doesn't need to
> compile for the m// at all. The fact your example only compiles the m//
> once is the 'if a variable hasn't changed, don't recompile'
> optimization, which applies regardless of qr//:
>
> ~% perl -Mre=debug -e'$qr=qr/a/; / $qr/ for 1, 2' 2>&1 | grep Comp
> Compiling REx `a'
> Compiling REx ` (?-xism:a)'
> ~% perl -Mre=debug -e'$qr=q/a/; / $qr/ for 1, 2' 2>&1 | grep Comp
> Compiling REx ` a'
>
Interesting, I didn't know that this subtle trap
lurked in qr. A safer practice might be using
the compiled qr expression alone rather than the
equivalent /$qr/ eye-candy:
$qr = qr/^foo$/;
"foo" =~ / $qr/; # fails (unintended space)
"foo" =~ $qr; # succeeds.
Exceptions:
need $qr to be subexpression
need $_ implicit match
need /g switch
--
Charles DeRykus
------------------------------
Date: Sun, 01 Jun 2008 19:04:35 -0400
From: =?ISO-8859-1?Q?Arne_Vajh=F8j?= <arne@vajhoej.dk>
Subject: Re: The Importance of Terminology's Quality
Message-Id: <48432b01$0$90272$14726298@news.sunsite.dk>
szr wrote:
> Arne Vajhøj wrote:
>> szr wrote:
>>> Peter Duniho wrote:
>>>> On Fri, 30 May 2008 22:40:03 -0700, szr <szrRE@szromanMO.comVE>
>>>> wrote:
>>>>> Arne Vajhøj wrote:
>>>>>> Stephan Bour wrote:
>>>>>>> Lew wrote:
>>>>>>> } John Thingstad wrote:
>>>>>>> } > Perl is solidly based in the UNIX world on awk, sed, } > bash
>>>>>>> and C. I don't like the style, but many do.
>>>>>>> }
>>>>>>> } Please exclude the Java newsgroups from this discussion.
>>>>>>>
>>>>>>> Did it ever occur to you that you don't speak for entire news
>>>>>>> groups?
>>>>>> Did it occur to you that there are nothing about Java in the
>>>>>> above ?
>>>>> Looking at the original post, it doesn't appear to be about any
>>>>> specific language.
>>>> Indeed. That suggests it's probably off-topic in most, if not all,
>>>> of the newsgroups to which it was posted, inasmuch as they exist for
>>>> topics specific to a given programming language.
>>> Perhaps - comp.programming might of been a better place, but not all
>>> people who follow groups for specific languages follow a general
>>> group like that - but let me ask you something. What is it you
>>> really have against discussing topics with people of neighboring
>>> groups? Keep in mind you don't have to read anything you do not want
>>> to read. [1]
>> I very much doubt that the original thread is relevant for the Java
>> group.
>>
>> But the subthread Lew commente don was about Perl and Unix. That is
>> clearly off topic.
>
> I agree with and understand what you are saying in general, but still,
> isn't it possible that were are people in the java group (and others)
> who might of been following the thread, only to discover (probably not
> right away) that someone decided to remove the group they were reading
> the thread from? I know I would not like that, even if it wasn't on
> topic at the branch.
>
> Personally, I find it very annoying to have to switch news groups in
> order to resume a thread and weed my way down the thread to where it
> left off before it was cut off from the previous group.
I am relative tolerant towards threads that are a bit off topic, if
the S/N ratio overall is good.
But I accept and respect that other people has a more strict
attitude against off topic posts.
And I am very little tolerant towards people that think they
can attack those that want only on topic posts.
One thing is to ask for a bit of slack regarding the rules
something else is attacking those that want the rules
kept.
Arne
------------------------------
Date: Sun, 1 Jun 2008 14:28:00 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <8a12787c-2b10-4b07-b396-d1de11e5989b@m45g2000hsb.googlegroups.com>
On May 30, 8:33=A0pm, Bill H <b...@ts1000.us> wrote:
> > >> So you could have said "It is trivial to do so, check out this site,
> > >> or google for this software." Probably would have been faster on your=
> > >> end and would have gotten a "thank you sinan" and a few nice thoughts=
> > >> on my end.
>
> > > Yeah, I thought a pointer to some answer would have been nice too.
>
> > Well, OK then.
>
> > The OP did not specify which web server he wanted to install. Therefore,=
> > I did not post any pointers.
>
> > John Bokma has step-by-step instructions for installing Apache on
> > Windows:
>
> >http://johnbokma.com/windows/apache-virtual-hosts-xp.html
>
> Thanks Sinan! I will look into this
>
> Bill H- Hide quoted text -
>
> - Show quoted text -
Ok major frustration here, I know this is OT but I am sure one of you
have hit this before.
I installed Apache on the Vista Home Premium, Installed ActiveState
Perl, got it all setup, ran fine, saw the environment variables when I
ran localhost/cgi-bin/printenv.pl everything was happy. Setup my local
folders for my site (lc.billh.com) using all the instructions, dropped
in a little index.html to make sure it worked, all works, still happy.
Copyed the printenv.pl to a cgi-bin in my new site folder, tried to
execute it lc.billh.com/cgi-bin/printenv.pl and got page not
found..... Hmmm looked at the printenv.pl with notepad (1st have to
tell vista I want to use notepad to look at it, didn't change the
"always" open with) and all looks good. Tried the original localhost/
cgi-bin/printenv.pl and IE now wants to know if I want to open or save
it - WTF? Am totally lost
Bill H
------------------------------
Date: Mon, 02 Jun 2008 01:14:29 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <6agottF37khegU1@mid.individual.net>
Bill H wrote:
> Ok major frustration here, I know this is OT but I am sure one of you
> have hit this before.
>
> I installed Apache on the Vista Home Premium, Installed ActiveState
> Perl, got it all setup, ran fine, saw the environment variables when I
> ran localhost/cgi-bin/printenv.pl everything was happy. Setup my local
> folders for my site (lc.billh.com) using all the instructions, dropped
> in a little index.html to make sure it worked, all works, still happy.
> Copyed the printenv.pl to a cgi-bin in my new site folder, tried to
> execute it lc.billh.com/cgi-bin/printenv.pl and got page not
> found..... Hmmm looked at the printenv.pl with notepad (1st have to
> tell vista I want to use notepad to look at it, didn't change the
> "always" open with) and all looks good. Tried the original localhost/
> cgi-bin/printenv.pl and IE now wants to know if I want to open or save
> it - WTF? Am totally lost
That's what makes IndigoPerl an attractive option. ;-)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sun, 01 Jun 2008 23:34:41 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <98c6445t8o21vfqct0lloivsinqgje7ln0@4ax.com>
Bill H <bill@ts1000.us> wrote:
>"always" open with) and all looks good. Tried the original localhost/
>cgi-bin/printenv.pl and IE now wants to know if I want to open or save
>it - WTF? Am totally lost
Very wild guess: maybe you configured your web server to serve the file
rather then execute it?
You may want to ask in a NG that actually deals with web server
configuration. I am sure you can get more knowledgable advise there.
jue
------------------------------
Date: Sun, 1 Jun 2008 17:01:12 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Re: Using perl locally on a Windows XP system
Message-Id: <4a1f9080-948c-437d-8fa1-0e1ff43bcea4@w7g2000hsa.googlegroups.com>
On Jun 1, 7:34=A0pm, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> Bill H <b...@ts1000.us> wrote:
> >"always" open with) and all looks good. Tried the original localhost/
> >cgi-bin/printenv.pl and IE now wants to know if I want to open or save
> >it - WTF? Am totally lost
>
> Very wild guess: maybe you configured your web server to serve the file
> rather then execute it?
> You may want to ask in a NG that actually deals with web server
> configuration. I am sure you can get more knowledgable advise there.
>
> jue
Actually figured out what it is and give up on trying it. Crazy Vista
combined with file permissions in apache causes any file I touch to
loose its permissions flags. Not gonna install an ftp server in the
laptop so I can u/l file to it and set the permissions- will go back
to just uploading it to the server and testing. It was a learning
expetience and know I know why people hate the UAC in vista
Bill H
------------------------------
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 1601
***************************************