[11872] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5472 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 24 08:07:56 1999

Date: Sat, 24 Apr 99 05:00:25 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 24 Apr 1999     Volume: 8 Number: 5472

Today's topics:
    Re: $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex( (Benjamin Franz)
    Re: $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex( (Bart Lateur)
        Cant run perl scripts on Apache server on NT agniora@usa.net
    Re: cheap perl scripts cindycrawford@my-dejanews.com
    Re: chomp-ing from the FRONT end (Bart Lateur)
    Re: Deferences in Explorer vs. Netscape? <gellyfish@gellyfish.com>
    Re: embedding Perl in C <ebohlman@netcom.com>
    Re: FAQ 3.26: Why don't perl one-liners work on my DOS/ <ghira@mistral.co.uk>
        GIFgraph problems <mkshanx@ust.hk>
    Re: help ! how can i extract an attach file in a mail <gellyfish@gellyfish.com>
    Re: Help understanding this script <gellyfish@gellyfish.com>
    Re: I need help!!!!! (Tad McClellan)
    Re: I need help!!!!! <gellyfish@gellyfish.com>
        Mark Peskin and PERCEPS <tbryan@arlut.utexas.edu>
        Newbie regex query <andyelv@ibm.net>
    Re: Perl 'split' function in C?? (Ran)
    Re: perl - cgi Hash handling. (Steve Grantz)
    Re: PERL Books <gellyfish@gellyfish.com>
        Perlscript on a winNT apache server isnt working agniora@usa.net
    Re: Perlscript on a winNT apache server isnt working <gellyfish@gellyfish.com>
    Re: Pub wanted ($) <gellyfish@gellyfish.com>
    Re: QUESTION:Perl Regular Expression Subtring Matches?  <c_graham@hinge.mistral.co.uk>
        QUESTION:Perl Regular Expression Subtring Matches? Stra <c_graham@hinge.mistral.co.uk>
    Re: QUESTION:Perl Regular Expression Subtring Matches?  <ebohlman@netcom.com>
    Re: Refresh button on a web page? <ebohlman@netcom.com>
        The docs as talking books (was Re: newbie with a "howto <gellyfish@gellyfish.com>
        Tr is single char, and you don't need the \ <plaak@home.com>
    Re: tr/\,// (Matthew Bafford)
    Re: tr/\,// (Bart Lateur)
        What is the meaning of Perl module ? (Austin Ming)
    Re: What is the meaning of Perl module ? (Bob Trieger)
        XBase and Perl2exe <mario_deserranno@hotmail.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 24 Apr 1999 07:57:57 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
Message-Id: <9QeU2.1676$oU1.72940@typhoon-sf.snfc21.pbi.net>

In article <MPG.118ac91b70ce494a98992f@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
><SNIP>
>
>The following caught my eye in a quick scan of the code:
>
>> 	$sec   = "0$sec"  if (length($sec)  < 2);
>> 	$min   = "0$min"  if (length($min)  < 2);
>> 	$hour  = "0$hour" if (length($hour) < 2);
>> 	$mday  = "0$mday" if (length($mday) < 2);
>> 	if ($year < 95) {
>> 		$year  = $year + 2000;
>> 	}
>> 	if (($year > 94) && ($year < 1000)) {
>> 		$year = $year + 1900;
>> 	}
>>         
>> 	return ("$wkday, $mday $month $year ${hour}\:${min}\:${sec} GMT");
>
>While I have an aversion to huge modules, that doesn't apply to builtin 
>functions such as sprintf, which would make this snippet much more 
>compact (as well as faster, though I doubt that it matters at all).

True. There is a bit of historical crud here and there in the module.
I wrote some pieces of it more than 3 years ago (when my Perl skills
were considerably lower), and it shows. At least posting it has prompted 
me to properly fix the Y2K related junk you can see there in my local 
copy. :)

-- 
Benjamin Franz


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

Date: Sat, 24 Apr 1999 08:38:13 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
Message-Id: <372981d3.6687942@news.skynet.be>

Rapision wrote:

>Although I met the following line many times while I study perl,
>$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
>I can not understand exactly what it means.
>Please advise me how it works.

Aha. Yes, that IS pretty cryptic. So let's rip it apart, starting from
the back side.

First, suppose the value for $1 is "A0". If you test 

	print hex("A0")

you'll see 160. That is the numerical value of the hex number 0xA0.

pack("C", $_) is the old version (pre Perl5) for chr($_) . The function
chr() is new in Perl 5. The only advantage of pack() over chr() is that
you can do more than one character at a time.

	print pack("C*", 65, 66, 67);

prints "ABC". Same result as you would have had with

	print chr(65).chr(66).chr(67)


So now the statement is already reduced to the form

	s/%($pat)/expr($1)/ge;

where $pat is a pattern that matches two hex digits (a hex digit matches
[0-9A-F] but case insensitive), and the sub expr() turns a hex number
into a character.

The //e modifier makes sure the right hand side is executed as Perl
code, instead of just inserted as a string, and the value of the
executed code is inserted. //g means: substitute ALL occurrences, not
just one (at most).

So, here's some equivalent code:

	sub expr {
		my($hexnum) = @_; 		# "A0"
		my $charcode = hex($hexnum);	# 160
		my $char = chr($charcode);	# non-breaking space
		return $char;
	}

	$pat = '[0-9a-fA-F][0-9a-fA-F]'; 	# 2 hex digits

	s/%($pat)/expr($1)/oge; # //o : compile pattern only once


Try it out with, for example:

	$_ = "Hello%2C%20world%21\n";


Does that answer your question?

	Bart.


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

Date: Sat, 24 Apr 1999 08:55:46 GMT
From: agniora@usa.net
Subject: Cant run perl scripts on Apache server on NT
Message-Id: <7fs0ui$l7s$1@nnrp1.dejanews.com>

when i try to point to a perl script on my apache server on NT platform, it
just displays the file as a text file instead of executing it. does anyone
know how i might be able to get my server to run perl scripts? thanks

agniora

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


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

Date: Sat, 24 Apr 1999 11:08:36 GMT
From: cindycrawford@my-dejanews.com
Subject: Re: cheap perl scripts
Message-Id: <7fs8nj$qqj$1@nnrp1.dejanews.com>

In article <372f40c2.3349313@nntp.best.com>,
  pejman@pejman.com wrote:
> Hi,
>
> I am looking for somebody, who can write me some small perl scripts
> for small amount of money. Please let me know if you are interested
> or if you know somebody who is willing to do that.
>
> (please reply to my email-address)
>
> Thanks in advance,
> 	Pejman
>
>
we can help you
just send us details at office@cgi-shop.com

Cindy
http://cgi-shop.com

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


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

Date: Sat, 24 Apr 1999 08:38:11 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: chomp-ing from the FRONT end
Message-Id: <372476b4.3840795@news.skynet.be>

Larry Rosler wrote:

>    $string =~ s%$/%%;

chomp() doesn't use regexes:

    $string =~ s%^\Q$/\E%%;

except... in the case where $/ eq '' :

    $string =~ s%^(\n\n+)%% if defined $/ && $/ eq '';

	Bart.


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

Date: 24 Apr 1999 10:18:33 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Deferences in Explorer vs. Netscape?
Message-Id: <7fs5pp$1mu$1@gellyfish.btinternet.com>

On Fri, 23 Apr 1999 19:25:09 -0700 David Dodd wrote:
> Ok,
> 
> I finally got a script up and running and now I find that it works great in
> Internet Exploder but Netscape always returns...   "Document contains no
> data."
> 

IE is just winging it in the face of a broken script - however this is
nothing whatsoever to do with Perl despite any protestations that your
script might be written in Perl (substitute C,REXX,APL,FORTRAN as appropriate)
you need to ask in a group that is interested in these matters.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 24 Apr 1999 08:11:57 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: embedding Perl in C
Message-Id: <ebohlmanFAopFx.95w@netcom.com>

David Cassell <cassell@mail.cor.epa.gov> wrote:
: What are you using the Perl code to do, and are you using Perl in
: an efficient manner?  Is your code the fastest way to implement
: the problem in Perl?  Bear in mind that is *not* necessarily the 
: same as the fastest way to implement it in C.

And vice-versa.  'C in Perl' is often significantly slower than idiomatic 
Perl because it translates into more Perl opcodes to be executed as a 
result of using Perl code to step through strings a character at a time, etc.



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

Date: 24 Apr 99 08:50:52 +0000
From: "Adam Atkinson" <ghira@mistral.co.uk>
Subject: Re: FAQ 3.26: Why don't perl one-liners work on my DOS/Mac/VMS system?
Message-Id: <577.783T2608T5304901ghira@mistral.co.uk>

On 20-Apr-99 16:54:25, David Cassell said:

>      For example, the above one-liner can be written under Unix and
>      Plan9 as:
>      
>      perl -e 'print qq(Hello world\n)'
>  
>      and under DOS, Win32, 4DOS, and VMS as:
>  
>      perl -e "print qq(Hello world\n)"

>Ilya, this works under OS/2 also, doesn't it?  I don't have access
>to a copy to check.  Nor was I able to check on QNX or an Amiga.

The second one works on an Amiga.

-- 
Adam Atkinson (ghira@mistral.co.uk)
VOLCANO MISSING FEARED DEAD



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

Date: Sat, 24 Apr 1999 15:02:03 +0800
From: "Shashank Tripathi" <mkshanx@ust.hk>
Subject: GIFgraph problems
Message-Id: <7frq8i$3tg@ustsu10.ust.hk>

Hi I am using the sample program that comes with GIFgraph and it gives me
the following error:

---------------
Software error:
Can't locate object method "new" via package "GIFgraph::bars" at
C:\Inetpub\wwwroot\cgiii\gifgraph1.pl line 14.
---------------


Would really appreciate advice on what I might be doing wrong..

S





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

Date: 24 Apr 1999 11:51:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: help ! how can i extract an attach file in a mail
Message-Id: <7fsb7t$1q0$1@gellyfish.btinternet.com>

On Fri, 23 Apr 1999 08:15:00 GMT mikl_paris@my-dejanews.com wrote:

Subject: help ! how can i extract an attach file in a mail

> help me
> 

Thats not a very good description of your problem really is it ?

However you will almost certainly want to be using one of the MIME::*
modules available from CPAN:

MIME::Base64                       2.11  GAAS/MIME-Base64-2.11.tar.gz
MIME::Body                        4.109  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder                     4.107  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder::Base64             4.105  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder::Binary             4.103  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder::Gzip64             4.105  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder::NBit               4.104  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder::PGP                  1.1  JWIED/Mail-IspMailGate-1.003.tar.gz
MIME::Decoder::QuotedPrint        4.104  ERYQ/MIME-tools-4.122.tar.gz
MIME::Decoder::UU                 4.103  ERYQ/MIME-tools-4.122.tar.gz
MIME::Entity                      4.116  ERYQ/MIME-tools-4.122.tar.gz
MIME::Field::ContDisp             4.102  ERYQ/MIME-tools-4.122.tar.gz
MIME::Field::ConTraEnc            4.102  ERYQ/MIME-tools-4.122.tar.gz
MIME::Field::ContType             4.102  ERYQ/MIME-tools-4.122.tar.gz
MIME::Field::ParamVal             4.101  ERYQ/MIME-tools-4.122.tar.gz
MIME::Head                        4.105  ERYQ/MIME-tools-4.122.tar.gz
MIME::IO                          4.105  ERYQ/MIME-tools-4.122.tar.gz
MIME::Latin1                      4.103  ERYQ/MIME-tools-4.122.tar.gz
MIME::Lite                        1.132  ERYQ/MIME-Lite-1.132.tar.gz
MIME::Parser                      4.103  ERYQ/MIME-tools-4.122.tar.gz
MIME::ParserBase                  4.111  ERYQ/MIME-tools-4.122.tar.gz
MIME::QuotedPrint                  2.03  GAAS/MIME-Base64-2.11.tar.gz
MIME::Tools                       4.122  ERYQ/MIME-tools-4.122.tar.gz
MIME::ToolUtils                   4.104  ERYQ/MIME-tools-4.122.tar.gz
MIME::Words                       4.104  ERYQ/MIME-tools-4.122.tar.gz

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 24 Apr 1999 11:42:54 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help understanding this script
Message-Id: <7fsanu$1pj$1@gellyfish.btinternet.com>

On Fri, 23 Apr 1999 15:03:56 GMT gustavo9000@my-dejanews.com wrote:
> Hello
> 
> I need some help understanding the following lines in a HTML source code.
> 
> <p><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
> 

gellyfish@gellyfish:/home/gellyfish/clpmtest > perl -e '<p><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'
String found where operator expected at -e line 1, near "PUBLIC "-//IETF//DTD HTML//EN""
        (Do you need to predeclare PUBLIC?)
syntax error at -e line 1, near "PUBLIC "-//IETF//DTD HTML//EN""
Execution of -e aborted due to compilation errors.

I dont think that what you've got there is Perl.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Fri, 23 Apr 1999 22:21:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: I need help!!!!!
Message-Id: <jr9rf7.2k9.ln@magna.metronet.com>

serguei (sergue@ica.net) wrote:
: Can somebody help me with this task.

: use CGI;
      ^^^
: $q = new GCI;
           ^^^

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


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

Date: 24 Apr 1999 11:16:44 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I need help!!!!!
Message-Id: <7fs96s$1ol$1@gellyfish.btinternet.com>

On Fri, 23 Apr 1999 15:41:53 +0200 Ysteric's wrote:
> 
>>   @ser =
> ($num,$one,$two,$line1,$line2,$line3,$three,$four,$five,$six,$seven,);
> 
> 
> i think that :
> undef @ser
> push @ser,
> [$num,$one,$two,$line1,$line2,$line3,$three,$four,$five,$six,$seven];
> 
> is better.
> 

Your preferences are as maybe but the two do completely different things:

@array1 = ("one","two","three","four");

print @array1,"\n";

push @array2, ["one","two","three","four" ];

print @array2,"\n";

Giving :

onetwothreefour
ARRAY(0x80d7044)

The first initializes the array with the list of values, the second adds
an array element that is a reference to an array comprising the list of
values which is generally how one creates a multi-dimensional array in
Perl.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 24 Apr 1999 00:55:23 -0400
From: "Thomas A. Bryan" <tbryan@arlut.utexas.edu>
Subject: Mark Peskin and PERCEPS
Message-Id: <37214EBB.558EAB7C@arlut.utexas.edu>

>From the PERCEPS home page:
http://friga.mer.utexas.edu/mark/perl/perceps/
"PERCEPS is a Perl script designed to parse C/C++ header files 
and automatically generate documentation in a variety of 
formats based on the class definitions, declarations, and 
comment information found in those files. This allows you to 
comment your code and generate useful documentation at the same 
time with no extra effort. PERCEPS can be useful both as a 
documentation tool and a simple but effective collaboration 
tool for both C and C++ projects."

The previous maintainer was Mark Peskin.  He appears to have 
graduated in Spring of 1998.  Although his web page still
offers PERCEPS, it appears that he has not worked on it since 
version 3.4.1 was released in February 1998.  I have searched 
for his current e-mail/homepage on various search engines, 
and I have looked for recent postings from him with Dejanews.
I have found no information more recent than that given on his
web page http://friga.mer.utexas.edu/mark/perl/

Is anyone maintaining PERCEPS?  Or does anyone know how to 
contact Mark Peskin?  I am considering taking over the code
(at least temporarily) if there is no current maintainer.


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

Date: Sat, 24 Apr 1999 19:55:04 +1200
From: Andy Elvey <andyelv@ibm.net>
Subject: Newbie regex query
Message-Id: <372178D8.7438@ibm.net>

I've been having a go with regexes - in particular, using them to get a
simple derivative (calculus) script going.  I'm trying to get the code
to take a very 
simple function like 7x3 (7 times "x" cubed) and return the derivative
(21x2). 
The code so far is as follows -   

!#/usr/bin/perl
print "Enter a function : " ;
while(<STDIN>) { 
  if (/([0-9]*)([a-zA-Z]+)([0-9]*)/) 
 {
    print "Derivative is ($1*$3)$2($3)-1 \n" ; 
 }
else 
 { 
   print "Sorry ... cant do derivative \n" ;  
  } 
}

The answer that this returns to 7x3 is (7*3)x(3)-1   . 
 I've tried using the eval function , but with no luck so far.  
 Anyone have any ideas .... ? :-) 
 ( By the way - I know of the calculus modules on CPAN - I'm just doing
this to get 
 the feel of regexes ....) 
 Thanks in advance for any help or tips.


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

Date: Sat, 24 Apr 1999 04:59:00 GMT
From: ran@netgate.net    (Ran)
Subject: Re: Perl 'split' function in C??
Message-Id: <924929940.937.98@news.remarQ.com>

In <7fo687$kj$1@gellyfish.btinternet.com>, Jonathan Stowe <gellyfish@gellyfish.com> writes:

>Except of course that strtok doesnt do regex

No,  but regexp(3) does,  and it might be simpler to throw a wrapper
around that to generate the required "(.+)"s (or "(.*)"s,  depending on 
whose flavor of adjacent-delimiter rule you prefer) and handle > 9
"fields",  than to adapt the Perl source to use C-style variables.

Especially if you could live with the 9-field limit.

Ran




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

Date: Sat, 24 Apr 1999 11:07:48 GMT
From: sgrantz@visi.com (Steve Grantz)
Subject: Re: perl - cgi Hash handling.
Message-Id: <8ChU2.620$WA4.131216@ptah.visi.com>

jatgal@my-dejanews.com wrote:
: 
: I tried all the following, but none seems to work, please help me out
: 
:      if ($query->param('choice') == 'meenie')
:      {
:           then do this ...
:      }
: 
:      if(keys($query->param('choice') == 'meenie'))
:      {
:           then do this ...
:       }
: 
: Any ideas on how I can access the correct data. Your help would be greatly
: appreciated.

You are accessing the datum corectly through the param method. The
problem is in your conditional evaluation. Use eq rather than ==
to compare strings in Perl. (Likewise gt,ge,lt,le for >,>=,<,<=).

-Steve 

-- 
I despise those 'God Speaks' billboards.

That's why Satan Speaks at
http://www.visi.com/~sgrantz         		


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

Date: 24 Apr 1999 10:30:54 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PERL Books
Message-Id: <7fs6gu$1nr$1@gellyfish.btinternet.com>

On Fri, 23 Apr 1999 22:14:39 -0400 E. Preble wrote:
> What are the best books out there for all levels of PERL writers?
> 

A spot of token pedantry - it is Perl when you are talking about the
language and perl when you are talking about the actual executable.
As with most things with their origins in the Unix world it is case
sensitive (and yes I am assiduously avoiding mentioning anything to
do with acronyms :)

<snip>

Check out:

   <reference.perl.com/query.cgi?books>

> Thanks ahead.  If enough people answer, I'll submit this info to
> the FAQ.
> 

Er, I think you'll find its already there - whaddya mean you didnt look.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 24 Apr 1999 09:23:04 GMT
From: agniora@usa.net
Subject: Perlscript on a winNT apache server isnt working
Message-Id: <7fs2hn$mcf$1@nnrp1.dejanews.com>

I am trying to run my perl script on winNT apache server, but the server just
displays it as if it was a text file and does nothing about it.
heres my script:
#!g:\perl\bin\perl.exe
print qq|<html>
<head><title>What is this?</title></head>
    <body>
<center>What is this?</center>
</body>
</html>|;
exit;

please try connecting to this addy to see the problem im having :
http://cairn.agni.com/cgi.pl

thanks
agniora

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


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

Date: 24 Apr 1999 10:10:34 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perlscript on a winNT apache server isnt working
Message-Id: <7fs5aq$1mr$1@gellyfish.btinternet.com>

On Sat, 24 Apr 1999 09:23:04 GMT agniora@usa.net wrote:
> I am trying to run my perl script on winNT apache server, but the server just
> displays it as if it was a text file and does nothing about it.
> heres my script:
> 
<snip>

> please try connecting to this addy to see the problem im having :
> http://cairn.agni.com/cgi.pl
> 

I don't need to.  The problem is either with the configuration of your
server or where you have put your program and because that makes it
not-a-Perl-problem you should go and ask in the appropriate group which
in this case is comp.infosystems.www.servers.ms-windows or even better
you can find out from the documentation that comes with Apache :

<http://cairn.agni.com/manual>

/J\


D
D
D
D
D
D
D
D
D
D
D
http://cairn.agni.com/manual>
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 24 Apr 1999 10:40:16 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Pub wanted ($)
Message-Id: <7fs72g$1nv$1@gellyfish.btinternet.com>

On Fri, 23 Apr 1999 17:57:29 -0700 Ours wrote:
> Featuring:
> 
> Frames->autoscroll/reload

No need it all happens in real-time

> Avatars

No need one is represented by ones own physical body

> File xfer

Via floppy disk

> Whispering

Considered rude in some quarters so not supported

> Multiple rooms

Yep Snug, Saloon bar, Public Bar

> Every room it's own config (background, etc.)

Easily configurable - decorators wages extra

> Switching possible

Not sure what you mean

> Search user
> 

'Jonathan been in ?'
'I think he's just gone down the Cinque Ports'

> 
> Willing to pay for good results.
> 

I hear The Crown's for sale ~ #250,000.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 24 Apr 1999 10:29:40 +0000
From: Craig Graham <c_graham@hinge.mistral.co.uk>
Subject: Re: QUESTION:Perl Regular Expression Subtring Matches? Strange  Behaviour...
Message-Id: <37219D14.983F980F@hinge.mistral.co.uk>

Eric Bohlman wrote:
> 
> Craig Graham <c_graham@hinge.mistral.co.uk> wrote:
> : When I came to code the regex processor, I noticed this behaviour
> : from Netscape - and when I checked with Perl, that's the same:
> 
> :   $_=aibajbccc;
> 
> :   /(a.b)+c+/;
> 
> :   print("$_\n");
> :   print("$& $1 $2 $3\n");
> 
> : This gives a result of $&="aibajbccc" as I would expect.
> : But it only gives the first substring match $1="aib", even though
> : I would have expected (a.b)+ to imply multiple substring matches
> : (indeed it does in the final match $&, where both substring matches
> : "aib" and "ajb" appear). If substring's are matched and processed into
> : the final match, how come only the first is actually returned on it's
> : own?
> 
> Each $n variable corresponds to a physical pair of parentheses.  Since
> your regex has only one pair of parentheses, $2 and $3 are not going to
> be touched.  If there's a quantifier (such as '+') after a pair of
> parenthesis, only the last match is recorded.

Ok, it's not quite what I would have expected (excuse my ignorance
here), as intuitively I'd have expected the + to extend to include 1 or
more substrings - it seems me to be an inconsistency in the
syntax/semantics
that it doesn't (I'm sure this has been discussed a hundred times
before).

Oh well...thanks for the answer.

Craig.


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

Date: Sat, 24 Apr 1999 09:46:58 +0000
From: Craig Graham <c_graham@hinge.mistral.co.uk>
Subject: QUESTION:Perl Regular Expression Subtring Matches? Strange Behaviour...
Message-Id: <37219312.862D9013@hinge.mistral.co.uk>

I've been developed a low-resource JavaScript interpreter for
embedded use, and as JavaScript takes it's regular expression
handling from Perl, this seems a good place to ask this
question....

When I came to code the regex processor, I noticed this behaviour
from Netscape - and when I checked with Perl, that's the same:

  $_=aibajbccc;

  /(a.b)+c+/;

  print("$_\n");
  print("$& $1 $2 $3\n");

This gives a result of $&="aibajbccc" as I would expect.
But it only gives the first substring match $1="aib", even though
I would have expected (a.b)+ to imply multiple substring matches
(indeed it does in the final match $&, where both substring matches
"aib" and "ajb" appear). If substring's are matched and processed into
the final match, how come only the first is actually returned on it's
own?

I'm not an expert with Perl, in fact this is the only Perl I have ever
written - I'm asking just because it seems a bit odd to me coming at it
from writing a regex parser from scratch that is supposed to mirror
the Netscape / Perl regex parser.

Any Guru's got any comments on this?

Craig.
c_graham@nospam.hinge.mistral.no_really_I_meant_nospam.co.uk


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

Date: Sat, 24 Apr 1999 09:17:12 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: QUESTION:Perl Regular Expression Subtring Matches? Strange Behaviour...
Message-Id: <ebohlmanFAosGo.BMI@netcom.com>

Craig Graham <c_graham@hinge.mistral.co.uk> wrote:
: When I came to code the regex processor, I noticed this behaviour
: from Netscape - and when I checked with Perl, that's the same:

:   $_=aibajbccc;

:   /(a.b)+c+/;

:   print("$_\n");
:   print("$& $1 $2 $3\n");

: This gives a result of $&="aibajbccc" as I would expect.
: But it only gives the first substring match $1="aib", even though
: I would have expected (a.b)+ to imply multiple substring matches
: (indeed it does in the final match $&, where both substring matches
: "aib" and "ajb" appear). If substring's are matched and processed into
: the final match, how come only the first is actually returned on it's
: own?

Each $n variable corresponds to a physical pair of parentheses.  Since 
your regex has only one pair of parentheses, $2 and $3 are not going to 
be touched.  If there's a quantifier (such as '+') after a pair of 
parenthesis, only the last match is recorded.


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

Date: Sat, 24 Apr 1999 08:19:24 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Refresh button on a web page?
Message-Id: <ebohlmanFAopsC.9CK@netcom.com>

Eric The Read <emschwar@rmi.net> wrote:
: "David MacBride" <dmacbride@home.com> writes:
: > Basically I want to have a button that the user can press if they want
: > the page to be reloaded from the server.  Is it possible?

: Beware!  You're devling into the black arts of the Mad Wizard, Abdul
: Al-Hazred!  If you travel down that road, forever will it dominate your
: destiny!

"This page best viewed with Necronomicon 2.0 or better."



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

Date: 24 Apr 1999 09:44:42 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: The docs as talking books (was Re: newbie with a "howto" question)
Message-Id: <7fs3qa$1ig$1@gellyfish.btinternet.com>

On Thu, 22 Apr 1999 15:31:01 GMT derose@my-dejanews.com wrote:
> Hello,
> 
> I'm new at Perl, and don't really have the patience's to find the answers in
> my books, so I thought I would ask some experts.
> 

<snip>

The time has come for us to admit that some people are so utterly feckless
that the act of concentrated reading is impossible for them - perhaps in
a few years this might be recognized as a real illness by the BMA and I
think in the inclusive spirit of the Perl community we should take some
steps to accomodate these poor damaged souls.

To this end I have started work on the module Pod::Speech which will render
the otherwise excellent but until now and in this respect severely limited
Perl documenatation as the spoken word.  Initially the interface will be
limited in comparison to say perldoc but Doris is going to do some work
on integrating the functionality of PSI::ESP and it is hoped that the
version to be included in the Perl 7 distribution will allow even the most
profoundly idle to find the answers they need - in concert with development
in the area of code generation we could find ourselves with a language
where no-one will be required to know how to program or type a line of code.

One area where some feedback would be useful is as to who's voice should be
used - Mrs Gellyfish is dead set on that of Sir Anthony Hopkins but I think
that might be national bias on her part.  Suggestions ?

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 24 Apr 1999 05:42:39 GMT
From: Peter Laakmann <plaak@home.com>
Subject: Tr is single char, and you don't need the \
Message-Id: <372159CF.88822E11@home.com>

Corey Saltiel wrote:

> $lame = "goober, shnarf";
> $lame =~ tr/\,//; # 'nix the comma
> print "lame is $lame\n";
>
> lame is goober, shnarf
>
> $lame = "goober, shnarf";
> $lame =~ tr/\,/?/;
>
> print "lame is $lame\n";
>
> lame is goober? shnarf
>
>    Whats up with that?
>
>    Yes, s/\,// works -- but why not tr?
>
> Beers,
>
> Corey
>
> ---
>
>    "We tend to scoff at the beliefs of the ancients, but we
>    can't scoff at them personally - to their faces. And this
>    is what really annoys me."
>       -- Jack Handy

tr/// is single character matching only.  You don't need, nor can you
use, the \ like that.  Do it like so:

[~/identd]$ perl -we '$var=q/a,b/; $var =~ tr/,/?/; print "$var\n";'
a?b
[~/identd]$




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

Date: Sat, 24 Apr 1999 06:36:12 GMT
From: dragons@dragons.duesouth.net (Matthew Bafford)
Subject: Re: tr/\,//
Message-Id: <slrn7i2njg.1k4.dragons@dragons.duesouth.net>

On Sat, 24 Apr 1999 04:47:19 GMT, Corey Saltiel <corey@americanrecruitment.com>
lucked upon a computer, and thus typed in the following:
: 
: $lame = "goober, shnarf";
: $lame =~ tr/\,//; # 'nix the comma
: print "lame is $lame\n";

tr/,//d;

: Beers,

Flavored waters,

: Corey

--Matthew


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

Date: Sat, 24 Apr 1999 08:38:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: tr/\,//
Message-Id: <37287d00.5452569@news.skynet.be>

Corey Saltiel wrote:

>$lame =~ tr/\,//; # 'nix the comma

>   Yes, s/\,// works -- but why not tr?

Because 

	tr/,//;

is equivalent to

	tr/,/,/;

See the docs for that. All it does, in practice, is count the number of
comma's.

Use the //d modifier:

	tr/,//d;

	Bart.


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

Date: 24 Apr 1999 11:19:21 GMT
From: austin95002887@yahoo.com (Austin Ming)
Subject: What is the meaning of Perl module ?
Message-Id: <7fs9bp$edn$3@gloup.linuxfr.org>

I am a beginner.

What is the meaning of Perl module ?



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

Date: Sat, 24 Apr 1999 11:43:37 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: What is the meaning of Perl module ?
Message-Id: <7fsabj$86s$1@birch.prod.itd.earthlink.net>

[ courtesy cc sent by mail if address not munged ]
     
austin95002887@yahoo.com (Austin Ming) wrote:
>I am a beginner.

Good, then "begin" by reading the documentation installed with perl and 
buy a copy of "Learning Perl".

>What is the meaning of Perl module ?


They are the things discussed in the "perlmod" portion of the 
documentation installed on your system when you installed perl.

perldoc perlmod


For documentation on a specific module try: perldoc <module name>

perldoc CGI
perldoc FTP
perldoc DateCalc 



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

Date: Sat, 24 Apr 1999 13:15:26 +0200
From: "Deserranno Mario" <mario_deserranno@hotmail.com>
Subject: XBase and Perl2exe
Message-Id: <7fs8t1$auj$1@news3.Belgium.EU.net>

Has anyone ever tried to convert his *.pl who also uses the XBase module
(reading dbf.databases) to exe's with the help of Perl2exe???





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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 5472
**************************************

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