[8883] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2500 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 5 08:18:34 1998

Date: Tue, 5 May 98 05:00:56 -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           Tue, 5 May 1998     Volume: 8 Number: 2500

Today's topics:
    Re: #PERL the IRC Channel on Efnet. (Chris Nandor)
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: cgi newsgroup - was Re: Perl Scripts Newsgroup <ucntcme@cyberhighway.net>
    Re: cgi-lib.pl or CGI.pm? (Bart Lateur)
    Re: CGI.pm/cgi-lib.pl benchmark (Was: cgi-lib.pl or CGI (Bart Lateur)
    Re: change a string <jacques.huntziger@khe.scn.de>
    Re: Communicating from child proc to parent via IPC? (Tom Grydeland)
    Re: condition to subroutine (Bart Lateur)
    Re: Ever Wonder Why Not Everyone Uses Modules? <Harald.Joerg@mch.sni.de>
    Re: Ever Wonder Why Not Everyone Uses Modules? <zenin@archive.rhps.org>
        GDBM in perl-5.004 ???? (Andreas Mueller)
    Re: If Perl had immediate subroutines... <zenin@archive.rhps.org>
    Re: If Perl had immediate subroutines... <zenin@archive.rhps.org>
    Re: If Perl had immediate subroutines... <jll@skynet.be>
    Re: If Perl had immediate subroutines... <jll@skynet.be>
    Re: Is this a safe lock? <p-fein@uchicago.edu>
        parsing query string <mariana.wuerz@magnum.fernuni-hagen.de>
    Re: parsing query string <mariana.wuerz@magnum.fernuni-hagen.de>
    Re: parsing query string (Hakan Hjelmstrom)
        PERL AND MS ACCESS ananta@w-o-i.com
        Perl Win NT <zoran@geof.ruu.nl>
    Re: Perl/Wall lingo question <jmuris@igr.nl>
    Re: Personal Web Server (Hakan Hjelmstrom)
    Re: Printing in Perl <zenin@archive.rhps.org>
        Question about %ENV <aidan@crux.blackstar.co.uk>
    Re: Question about %ENV (Hakan Hjelmstrom)
    Re: Question about %ENV <zenin@archive.rhps.org>
        regex newline substitution question lou@visca.com
        Sending perl HTML output to diffrent frames <adam@pacific-artists.demon.co.uk>
        stat function <mark@tmsnet.co.uk>
    Re: Win32::EventLog : brother, can you spare a second? <david.richards@alderley.zeneca.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 05 May 1998 07:38:18 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: #PERL the IRC Channel on Efnet.
Message-Id: <pudge-0505980738190001@ppp-3.ts-1.kin.idt.net>

In article <35504bd3.17885176@news.zip.com.au>, dac@NOSPAM.pcug.org.au wrote:

# *** Log file opened: 5/05/98 6:20:09
# <^Pudge> now, play nice, kids.
# <Dac> amagosa: please consider /ignore.Thankyou.
# amagosa sets mode: -o+b Dac *!*freeb@*.zip.com.au
# *** Log file closed: 5/05/98 6:20:39
# 
# About this time I tried to talk with the boy, only to be greeted with stony
# silence.  Such is life.  What else can one expect from a teenager?

You are not being entirely honest.  I convinced amagosa not to ban you, if
you would not try to start fights.  And frankly, I and everyone else in
#perl who are familiar with you thought that the last line you said there
was meant to be an "up yours" to amagosa.

Yes, amagosa was out of line.  But another op (me) stepped in to fix
things.  But you couldn't let it rest, so he kicked you again.  The fault
rests not solely on him.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Tue, 05 May 1998 10:24:01 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage894363841.15770@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 12 April 1998

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The Perl FAQ is modified frequently; the last major
update was in Spring of 1997. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://cpan.perl.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
403_662_481 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://cpan.perl.org/
    http://www.perl.com/CPAN/
    http://cpan.perl.org/doc/FAQs/FAQ/html/perlfaq.html
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq.html

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.
Another possibility is to use one of the FTP-via-email services; for
more information on doing that, send mail to <mail-server@rtfm.mit.edu>
(not to me!) with these lines in the body of the message, flush left:

    setdir usenet-by-group/news.announce.newusers
    send Anonymous_FTP:_Frequently_Asked_Questions_(FAQ)_List

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

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


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

Date: Mon, 04 May 1998 16:48:10 -0600
From: Bill Anderson <ucntcme@cyberhighway.net>
Subject: Re: cgi newsgroup - was Re: Perl Scripts Newsgroup
Message-Id: <354E45AA.191E2480@cyberhighway.net>

Dan Baker wrote:
> 
> Mikey Vaughan wrote:
> 
> > Is there a specific newsgroup that can offer assistance for writing cgi
> > scripts??
> ----------------------
> 
> A great way to find out if there are newsgroups covering a particular
> topic is to do some surfing with http://www.dejanews.com using a generic
> subject that you think would be mentioned in the group. In your case,
> try searching for "cgi"...
> 
> one of the groups you will turn up will be
> news:comp.infosystems.www.authoring.cgi
> 
> the only slightly non standard thing about this group is that you need
> to start the body of your first post with the word "passme" on a line by
> itself.
> 
> Dan

And that the UCE content is quite low :)

-- 
Bill Anderson                 Cyberhighway Internet Services, SYCON
"Pluralitas non est ponenda sine neccesitate."
Plurality should not be assumed without neccesity.


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

Date: Tue, 05 May 1998 09:56:04 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: cgi-lib.pl or CGI.pm?
Message-Id: <355ee1a9.7363520@news.tornado.be>

Martien Verbruggen wrote:

>What is unconvincing about CGI.pm being more reliable, less buggy,
>still supported, part of the standard distribution, having better
>debugging capabilities, being more flexible?

It is 150k. That all needs to be compiled, or at least be read in, every
time it is "use"-d. Which could be several times a second.

I'm constructing my own CGI library for the moment. Much of it is
"borrowed" from other modules, including CGI.pm. It does most of what I
will ever need, and yet, the size is under 7k.

	Bart.


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

Date: Tue, 05 May 1998 09:55:59 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: CGI.pm/cgi-lib.pl benchmark (Was: cgi-lib.pl or CGI.pm?)
Message-Id: <3559df3d.6743361@news.tornado.be>

brian d foy wrote:

>if speed and load are issues, use mod_perl [1] or fast-cgi [2].

If it's your very own server, yes.

	Bart.


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

Date: 5 May 1998 08:45:50 GMT
From: "Zeta" <jacques.huntziger@khe.scn.de>
Subject: Re: change a string
Message-Id: <01bd7802$9be6bde0$840c138e@huntzige.FR_HAG_01A>

Thanks very much for all answer.

Zeta <jacques.huntziger@khe.scn.de> a icrit dans l'article
<01bd743f$f5382120$840c138e@huntzige.FR_HAG_01A>...
> Hello,
> I have a little problem, I want to change in a string a / caratere, but I
> can't..
> I know that : $string =~ s/car/newcar/g;
> but for / what car use?
> Thank for you help.
> 
> 


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

Date: 5 May 1998 11:54:46 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Communicating from child proc to parent via IPC?
Message-Id: <slrn6ktvg6.hm7.Tom.Grydeland@mitra.phys.uit.no>

On 5 May 1998 05:37:58 GMT,
Jordan Gottlieb <eygottli@ouray.cudenver.edu> wrote:

> then I realized I have no clue how to use IPC to return information
> from the child process (and then de-padded myself on the back).  I 

> How would you go about using IPC to communicate back to the parent process 
> so that the parent process can update the hash?

A parent which wait()s on a child can pick up the child's exit() status.

Now look for those in perlfunc.

> Jordan

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


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

Date: Tue, 05 May 1998 09:54:05 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: condition to subroutine
Message-Id: <3558de87.6561889@news.tornado.be>

Bob Trieger wrote:

>I also learned empty parens aren't needed when ampersand is used.

Indeed. But also know that without the parens, the parameter array @_ is
passed as is. When using empty parentheses, an empty array is passed.

	Bart.


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

Date: 05 May 1998 10:29:26 +0200
From: Harald Joerg <Harald.Joerg@mch.sni.de>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <wkpvhtqfx5.fsf@mch.sni.de>

Tom Christiansen <tchrist@mox.perl.com> writes:

> In comp.lang.perl.misc, Brian Mathis <brianm@kodak.com> writes:
> :Just curious, why?  It would seem to be quite a bit safer then piping to
> :sendmail -t or mail or some other method.  What are the pros, cons?
> 
> How can the module be 'safer'?

Using a module could make my program work on non-UNIX without change.
Or on UNIXes which don't have sendmail in /usr/lib, or not installed
at all. If you do a lot of cross-platform perl, modules can be safer.

> [...]  Pop (plain old perl) programming 
> should not be disparaged out of Programmatic Correctness.

Of course not. Laziness, on the other hand, may justify a module
here and there.
-- 
Oook,
--haj--


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

Date: 5 May 1998 10:37:25 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <894365105.733593@thrush.omix.com>

Harald Joerg <Harald.Joerg@mch.sni.de> wrote:
	>snip<
: Using a module could make my program work on non-UNIX without change.
: Or on UNIXes which don't have sendmail in /usr/lib, or not installed
: at all. If you do a lot of cross-platform perl, modules can be safer.

	Sendmail is in /usr/lib or /usr/sbin on %99.9 of all Unix systems,
	even if it's not the system mailer.

	On the other hand, I'd guess that easily 1/5 of the Unix systems
	I've worked worked with had nothing listing on port 25.  Even if
	you have access to another SNTP server (smell a vary non-portable
	code change here to point to it? I do!) it might not be up when you
	try to send your mail (intermittent connections never happen,
	right?).  Are you ready to setup your own local message que and
	daemon to handle it? If you simply pipe to sendmail you'll get
	delivered in the best possible way, automatically qued if needed,
	and a host of other features and fall backs you're just not going
	to get with SNTP, ever.

	So, by using SNTP directly you build code that's *extremely*
	NON-portable between many, many common Unix servers as well
	as being vary unstable (no queuing system available), just to
	play nice on NT boxes?  And don't forget, the NT boxes are just
	as likely to have the same problems with SNTP as Unix boxes
	have, if not more! -Of the 30+ NT machines in my company, I don't
	think there is a single one that is running an SNTP server.

	Sendmail is FAR more cross-platform compatible then directly talking
	SNTP will *ever* be.  The "guru" that suggested the Net::SNTP module
	for simple mail on a Unix server was *vary* mistaken.

	And let's not forget queuing messages even if "instant" delivery
	might be available.  If you're on a heavily loaded server it can
	be life or death.

	If you want a fairly clean, robust, and portable interface to
	sendmail, checkout (soon to be at CPAN, but it's still alpha):

	ftp://thrush.omix.com/pub/perl/modules/Mail-Sendmail-1.10.tar.gz

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 4 May 1998 16:12:54 GMT
From: zxmve07@aix01.zdv.uni-tuebingen.de (Andreas Mueller)
Subject: GDBM in perl-5.004 ????
Message-Id: <6ikpe6$k7t$1@newsserv.zdv.uni-tuebingen.de>

	hello !!!

why isn't GDBM included in perl 5.004 anymore ??? (its still included in perl5.003.) and what shall  i use instead ???

	thanks,
		Andreas


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

Date: 5 May 1998 09:00:18 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: If Perl had immediate subroutines...
Message-Id: <894359278.220698@thrush.omix.com>

Jean-Louis Leroy <jll@skynet.be> wrote:
: ..and the call would be transformed into: print ($self)->{name}
:
: Unfortunately, isubs can't be used to inline accessors, at least not in a 
: weakly typed language :( The example above would require the parser to 
: know that '$self' is a Person.
:
: But, who knows, when Perl gets a measure of strong typing (this should 
: happen in 5.005, shouldn't it?)...

	It still won't help.  get_name() could be autoloaded and never
	actually get defined, ever.  This is one of the main reasons the
	compiler can't even check if get_name() isn't a typo.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 5 May 1998 09:19:56 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: If Perl had immediate subroutines...
Message-Id: <894360456.721481@thrush.omix.com>

Jean-Louis Leroy <jll@skynet.be> wrote:
: 2) Perl is *way* more powerful than cpp. I think we're all in agreement 
: here ;) You can always use a different preprocessor (m4 or even a Perl 
: script), but you loose on the ease-of-use side. The swift edit-test 
: cycle that Perl enjoys then becomes edit-preprocess-test.

	Why?  The -P command line option makes the test loop completely
	transparent, save for the performance overhead of calling cpp.

: 3) cpp may not be around on your customer's machine. This is the norm
: for Wintel.

	That's a bug, IMHO. -Yes, I also consider Solaris to be broken
	because it doesn't include a compiler also.

: > You may use pod commands to construct multiline comments.

: I've heard of that trick. That's my big problem with it: it's a very 
: ugly trick. Also, what happens if the module also contains *real* 
: comments?

	Agreed.  It's a vary, vary lame excuse for multi line comments.
	At the *vary* least, pod2* tools should recognize =comment or
	such and not parse it, but they don't, so it's lame.

: Yes, I'm looking, among other things, for user-controllable inlining.

	I've been thinking of trying to see what's possible using a
	module to parse __DATA__ scripts and add inclining.  Something
	maybe like:

	use inline foo => q{ print "@_\n"; };
	use inline::run join ('', <DATA>);

	__DATA__

	foo("some", "arguments");
	# gets inlined into print "some arguments\n";

	__END__

	I thought about this idea for about 10 seconds, at which time
	I decided without major compiler level support it would never
	happen simply because I'd have to hand parse perl, which isn't
	possible using Perl, only perl.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Tue, 05 May 1998 13:24:08 +0200
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: If Perl had immediate subroutines...
Message-Id: <VA.000000b6.19423156@jll>

In article <894360456.721481@thrush.omix.com>, Zenin wrote:
> Jean-Louis Leroy <jll@skynet.be> wrote:
> : 2) Perl is *way* more powerful than cpp. I think we're all in agreement 
> : here ;) You can always use a different preprocessor (m4 or even a Perl 
> : script), but you loose on the ease-of-use side. The swift edit-test 
> : cycle that Perl enjoys then becomes edit-preprocess-test.
>  
>  Why?  The -P command line option makes the test loop completely
>  transparent, save for the performance overhead of calling cpp.

My remark on lengthening the test loop applied only to using a different 
preprocessor. AFAIK, -P can only run the C preprocessor. Of course, you can 
fool Perl by renaming your favorite preprocessor 'cpp'.

>  I thought about this idea for about 10 seconds, at which time
>  I decided without major compiler level support it would never
>  happen simply because I'd have to hand parse perl, which isn't
>  possible using Perl, only perl.

Yeah, I know, my prototype is very easily confused. To be of any use, isubs 
would need to be called by the parser...

Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy



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

Date: Tue, 05 May 1998 13:24:10 +0200
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: If Perl had immediate subroutines...
Message-Id: <VA.000000b7.19423a4c@jll>

>  It still won't help.  get_name() could be autoloaded and never
>  actually get defined, ever.  This is one of the main reasons the
>  compiler can't even check if get_name() isn't a typo.

isubs could be required to be defined, IOW they not amenable to autoloading. 
Not an unreasonable restriction IMO. Or perhaps a mere declaration would 
suffice...

But I've thought of another problem with OO isubs: @ISA is not set until 
execution time, is it? A workaround would be to set @ISA in a BEGIN block. 
Anyway this is a problem that will need to be solved when strong typing is 
introduced.

Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy



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

Date: Tue, 5 May 1998 08:30:27 GMT
From: Peter A Fein <p-fein@uchicago.edu>
Subject: Re: Is this a safe lock?
Message-Id: <87u375m864.fsf@bj2-64.rh.uchicago.edu>

Tom Christiansen <tchrist@mox.perl.com> writes:

>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, Keith Vertrees <keith@comcore.com> writes:
> :I've checked out the FAQ and its discussion of the flock function, but
> :I'm wondering if people will agree with me that the following code is a
> :safe locking mechanism.  
> 
> It's not.
> 

Specifically, because the entire operation (through the end of the
acquire part) needs to be atomic, which it's not.  Right?

-- 
Peter Fein                                                         773-834-6206
1005 E. 60th St.                                              Chicago, IL 60637
p-fein@uchicago.edu                                   http://pfein.home.ml.org/



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

Date: Tue, 05 May 1998 11:40:25 +0200
From: Mariana Wuerz <mariana.wuerz@magnum.fernuni-hagen.de>
Subject: parsing query string
Message-Id: <354EDE88.43C8BB1C@magnum.fernuni-hagen.de>

#!/apps/bin/perl


# Bisherige Ausgabe tabellenname => tabellenfelder=> name+char
titel+char

print "Content-type: text/plain \n\n";

#$form_info = $ENV{'QUERY_STRING'};

$form_info="tabellenname=meinetabelle&felder=name+char%2C%0D%0Atitel+char%2C%0D%0Anummer+int%2C%0D%0A%0D%0A";

($tabellenname,$felder)=split(/&/,$form_info);

print "Tabellenname : $tabellenname<BR>\n";
print "Felder: $felder <BR>\n";

($tname, $tabellenname) = split (/=/, $tabellenname);
($tfelder, $tabellenfelder) = split(/=/,$felder);

print "Tabellenfelder: $tabellenfelder <BR>\n";

   $tabellenfelder =~ s/%([\da-fA-F]){2}/chr(hex($1))/eg;
   $zahl=hex($1);
   $character=chr($zahl);

print "Tabellenfelder: $tabellenfelder <BR>\n";

   $tabellenfelder =~ tr/"+"/ /;
   $tabellenfelder =~ tr/\n/ /;

print "Tabellenfelder: $tabellenfelder <BR>\n";

exit(0);









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

Date: Tue, 05 May 1998 12:34:35 +0200
From: Mariana Wuerz <mariana.wuerz@magnum.fernuni-hagen.de>
Subject: Re: parsing query string
Message-Id: <354EEB3B.C8C2240B@magnum.fernuni-hagen.de>

Why would not commatas be printed?

> #!/apps/bin/perl
>
> # Bisherige Ausgabe tabellenname => tabellenfelder=> name+char
> titel+char
>
> print "Content-type: text/plain \n\n";
>
> #$form_info = $ENV{'QUERY_STRING'};
>
> $form_info="tabellenname=meinetabelle&felder=name+char%2C%0D%0Atitel+char%2C%0D%0Anummer+int%2C%0D%0A%0D%0A";
>
> ($tabellenname,$felder)=split(/&/,$form_info);
>
> print "Tabellenname : $tabellenname<BR>\n";
> print "Felder: $felder <BR>\n";
>
> ($tname, $tabellenname) = split (/=/, $tabellenname);
> ($tfelder, $tabellenfelder) = split(/=/,$felder);
>
> print "Tabellenfelder: $tabellenfelder <BR>\n";
>
>    $tabellenfelder =~ s/%([\da-fA-F]){2}/chr(hex($1))/eg;
>    $zahl=hex($1);
>    $character=chr($zahl);
>
> print "Tabellenfelder: $tabellenfelder <BR>\n";
>
>    $tabellenfelder =~ tr/"+"/ /;
>    $tabellenfelder =~ tr/\n/ /;
>
> print "Tabellenfelder: $tabellenfelder <BR>\n";
>
> exit(0);





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

Date: Tue, 05 May 1998 11:28:53 GMT
From: hawk@algonet.se (Hakan Hjelmstrom)
Subject: Re: parsing query string
Message-Id: <354ef502.163368080@news.algonet.se>

On Tue, 05 May 1998 12:34:35 +0200, Mariana Wuerz wrote:
> Why would not commatas be printed?
<snip some code>
$tabellenfelder =~ s/%([\da-fA-F]){2}/chr(hex($1))/eg;
Move this------------------------^   ^---here

Gives:
$tabellenfelder =~ s/%([\da-fA-F]{2})/chr(hex($1))/eg;

Hekan Hjelmstrvm
hawk@algonet.se


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

Date: Tue, 05 May 1998 06:30:29 -0600
From: ananta@w-o-i.com
Subject: PERL AND MS ACCESS
Message-Id: <6imt8l$qb5$1@nnrp1.dejanews.com>

Here's my requirement: I am running IIS 3.0 on WINNT 4.0 I have PERL for
win32 installed on the same m/c I also have Access databases registered in
the System DSN on my server and I have been using ASP scripts to access them
(ODBC32-bit) I have done several PERL/CGI programs. Now I need to write a
PERL/CGI program that will open a database and query a certain table and then
present output in the Browser window. Is there any soul out there that knows
the exact syntax to open a database from within a PERL program Please E-mail
Express me : 3907889@pager.mirabilis.com ( directly to my computer screen )
or email me at ananta@w-o-i.com HURRY!

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Tue, 05 May 1998 13:54:45 +0200
From: Zoran Kovacevic <zoran@geof.ruu.nl>
Subject: Perl Win NT
Message-Id: <354EFE05.298503BE@thekitchen.nl>

I'm using Perl on NT (with IIS) and I'm trying to use packages (with the
use clause).
When I'm executing my perl script directly on the machine it works but
when I am executing the SAME perl (cgi) script form the browser, the
following error occurs:

Can't locate packagename.pm in @INC

So when I'm executing directly, perl can locate the package, but when
I'm executing from
a browser perl cannot locate the package.

Does anyone know what's wrong?

    (Lars Nap     l.nap@thekitchen.nl)





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

Date: Tue, 5 May 1998 12:14:40 +0200
From: "Jeroen Muris" <jmuris@igr.nl>
Subject: Re: Perl/Wall lingo question
Message-Id: <354ef8a6.0@care4all.nursing.nl>


Jeroen Muris heeft geschreven in bericht <354b30d0.0@care4all.nursing.nl>...

Never mind. The day I wrote this article can be marked down as a bad day in
the history of math. I'm glad I did not have to do anything important that
day. Sorry for the trouble you all had to try and figure out what I meant.

When in better shape, I'll try and get it right.

Jeroen Muris.




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

Date: Tue, 05 May 1998 09:16:20 GMT
From: hawk@algonet.se (Hakan Hjelmstrom)
Subject: Re: Personal Web Server
Message-Id: <354ec912.152120287@news.algonet.se>

On Mon, 4 May 1998 18:39:50 -0600, "Nervick" wrote:
> I'm using MS Personal Web Server on my computer at home. 
> <..>
> The problem is that 'require( "cgi-lib.pl" )' doesn't work!  
> the following message appears: cannot locate cgi-lib.pl in @INC.

Try using the full path to cgi-lib.pl.

Hekan Hjelmstrvm
hawk@algonet.se


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

Date: 5 May 1998 08:31:23 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Printing in Perl
Message-Id: <894357544.180463@thrush.omix.com>

Martien Verbruggen <mgjv@comdyn.com.au> wrote:
	>snip<
: Are you sure that $! has a meaning here?

	Yes.  If the fork() fails it will be your errno.
	ALWAYS test the close() too though.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Tue, 05 May 1998 09:16:56 GMT
From: Aidan Rogers <aidan@crux.blackstar.co.uk>
Subject: Question about %ENV
Message-Id: <894363424.442179@sparc.tibus.net>

Just a quick question about %ENV, because I can't find the answer elsewhere.

How does one find all the different values of %ENV, and what they represent?

Thanks in advance,

Aidan


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

Date: Tue, 05 May 1998 09:28:56 GMT
From: hawk@algonet.se (Hakan Hjelmstrom)
Subject: Re: Question about %ENV
Message-Id: <354fdb20.156742463@news.algonet.se>

On Tue, 05 May 1998 09:16:56 GMT, Aidan Rogers wrote:
> Just a quick question about %ENV, because I can't find the answer elsewhere.
> How does one find all the different values of %ENV, and what they represent?

You need to know about the 'keys' function. As for the meaning of the
different values, you'll have to look elsewhere.

#!/usr/bin/perl -w

use strict;

foreach my $key (keys %ENV) {
    print "$key \t $ENV{$key}\n";
}

Hekan Hjelmstrvm
hawk@algonet.se


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

Date: 5 May 1998 10:41:19 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Question about %ENV
Message-Id: <894365339.602660@thrush.omix.com>

Aidan Rogers <aidan@crux.blackstar.co.uk> wrote:
: How does one find all the different values of %ENV, and what they represent?

	perl -e 'for (keys %ENV) { print "$_: $ENV{$_}\n" }'

	As for what they meen, well that really depends on the application
	that needs them.  There is no one place where all are registered as
	to there use.  For instance, unless you've used Oracle you'd have
	no idea what TWO_TASK was meant for nore care.  Some are more common
	(HOME, EDITOR, DISPLAY, etc) but there still really isn't one home
	for them.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Tue, 05 May 1998 03:31:02 -0600
From: lou@visca.com
Subject: regex newline substitution question
Message-Id: <6imio6$dai$1@nnrp1.dejanews.com>

Here's a simple little script to copy html files into text files. It works
fine except that the first file in the directory, in ASCII-betical order,
isn't affected by the line: "$line =~ s/\n+/\n/gs;", though it is by both the
s/\t//gs; and s/<.*?>//gs; lines. All other files get their multiple  newlines
replaced by one newline and if I stick in a dummy file (00.html), then the
formerly first file is changed too.

Can anyone explain to me why this is? Thank-you.

-----------
#!/usr/local/bin/perl -w
use strict;
use diagnostics;

my @a = <c:/visca/cgi/cgi-help/*.html>;
for (@a) {
  unless (-d $_) {
    my $textname = $_;
    $textname =~ s/\.html/\.txt/;
    open(HTML, "$_") or die "Can't open $_ because $!";
    my @html = <HTML>;
    open(TEXT, ">$textname") or die "Can't create $textname because $!";
    my $line = '';
    foreach $line (@html) {
      $/ = '';
      $line =~ s/<.*?>//gs;
      $line =~ s/\t//gs;
      $line =~ s/\n+/\n/gs;
      print TEXT "$line";
    }
  }
}
------------
Thanks.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Tue, 5 May 1998 10:15:10 +0100
From: "Adam Carden" <adam@pacific-artists.demon.co.uk>
Subject: Sending perl HTML output to diffrent frames
Message-Id: <894359785.10329.0.nnrp-04.c2de97e4@news.demon.co.uk>

I am writing a search engine however I am unsure how to target the output of
the script to different frames.
I.E. Banner Ad based on search criteria in top frame
       Search results in main frame
All from the same script at the moment all I can get the script to do is
output to the current frame.
I do apologise if this is the wrong group as I am not sure where to post
it(perl, html or cgi?)
Replies by e-mail are welcome however if this is not possible I will be
checking back during the day
Thanks in advance.
Adam Carden





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

Date: Tue, 05 May 1998 11:56:43 GMT
From: "Mark Austin" <mark@tmsnet.co.uk>
Subject: stat function
Message-Id: <354efd29.0@tmsserv4.tmsnet.co.uk>

I've written a routine to get the file size of each file within a specific
directory.

however, it only works on particular files.  There doesn't seem to be a
pattern either.  I'm using NT as a platform.

Any suggestions ?




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

Date: 5 May 1998 11:45:08 GMT
From: "David Richards" <david.richards@alderley.zeneca.com>
Subject: Re: Win32::EventLog : brother, can you spare a second?
Message-Id: <01bd781b$3fd648e0$55a0479c@UKMCPHISFW051.ukmcph.zeneca.com>

Patrick

Have a look at 

http://www.inforoute.capway.com/leberre1/perldoc.htm

David

patrick.mannion@us.socgen.com wrote in article
<6ij31r$524$1@nnrp1.dejanews.com>...
> I picked up the llama book for the first time two years ago, and only
> recently has an opportunity to use perl appeared at work... we have a
network
> of approx 90 NT Servers, serving over 1500 users; i'd like to archive the
> event logs of all these machines for posterity/tracking down
stupidity/etc.
> I'm sure this has been done before, but i wanted to turn this into a
learning
> exercise ( and boy, did i learn a thing or two...)
> 
> problem is, the loop from server to server doesn't work in real-time.
> strangely enough, it works when i run it through the debugger... i'm
using
> build 315 from activestate, if it matters.
> 



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

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

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