[13439] in Perl-Users-Digest
Perl-Users Digest, Issue: 849 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 19 16:07:20 1999
Date: Sun, 19 Sep 1999 13:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <937771507-v9-i849@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 19 Sep 1999 Volume: 9 Number: 849
Today's topics:
Re: #exec cgi <ehpoole@ingress.com>
Re: builtin.pm <rick.delaney@home.com>
Re: builtin.pm (John G Dobnick)
Callin CGI from pull down - HELP ! <andrij@mail.idt.net>
Re: CONTEST: Range Searching <Richard@waveney.demon.co.uk>
Re: Converting time() to real date (Abigail)
Re: Converting time() to real date (Larry Rosler)
Re: CRAP Software (Abigail)
Re: CRAP Software (Abigail)
Re: CRAP Software <news@elmbronze.demon.co.uk>
Re: Help me please <dove@synopsys.com>
Re: How to chown and chmod (Abigail)
Re: List files in a dir (Abigail)
Re: Perl output to browser euan_woo9431@my-deja.com
PerlScript/Win32::ASP - Writeblock not found <davidra@nowonder.com>
Re: Some e-mails get sent, some don't (Larry Rosler)
Re: Super EASY DB websited with PERL (Abigail)
Re: Using a period as a delimiter in the split() functi (Larry Rosler)
Re: Using a period as a delimiter in the split() functi <rick.delaney@home.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 19 Sep 1999 15:52:46 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: #exec cgi
Message-Id: <37E53F0E.51E8E6AC@ingress.com>
comp.lang.perl removed from followups
CCC_Ltd wrote:
>
> > I'm trying to include a cgi program from an shtml page. My problem is, I
> > need to send a query string too. But
> > <!--#exec cgi="script.cgi?query"-->
> > If I try
> > <!--#exec cmd="script.cgi?query"-->
> > The directive is replaced with nothing at all.
>
> To use a query string on the ssi you have to include the
> query string in the URL when you call the .shtml file.
>
> example: http://mydomain/myshtml.shtml?querystring
>
> Also... get rid of the ?query in the ssi statement.
>
> one other note... it should be <!--#exec cgi="script.cgi"-->
> not <!--#exec cmd....
Some servers will permit a querystring argument to be passed in the SSI
call, others will not.
Some servers will recognize <!--#exec cgi="...?val=1"--> (e.g. IIS)
Others recognize <!--#include virtual="...?val=1"--> (e.g. Apache)
Others will only recognize the querystring passed in the document URL and
will not work with one included in the SSI directive.
The exec-cmd method could be rewritten to:
<!--#exec cmd="script.cgi val=1 val2=2"--> (e.g. Apache, IIS)
or
<!--#exec cmd="perl script.cgi val=1 val2=2"--> (e.g. IIS if perl isn't
mapped to *.pl in the file associations, otherwise use first example. Perl
must be in system Path)
... and the CGI scipt modified to also look for values in $ARGV[x] which
might allow the original poster to get to where he wants to go. Note that
you must specify either a relative file path or an absolute path, not a
URL to the script. The author will have to decide how he/she wants to
handle an instance in which there are both QUERY_STRING values and command
line ($ARGV[]) values present.
--
Ethan H. Poole **** BUSINESS ****
ehpoole@ingress.com ==Interact2Day, Inc.==
(personal) http://www.interact2day.com/
------------------------------
Date: Sun, 19 Sep 1999 18:19:14 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: builtin.pm
Message-Id: <37E5291B.C30EAE8A@home.com>
[posted & mailed]
rauznitz balazs wrote:
>
> Does anyone have this module ? I've been searching it for a week on CPAN
> and other places, but all I have is the docs and some broken links to
> download it :(
This module has been split into two and given names that fit in better
with the general module naming conventions.
Here's one place to get the replacement:
http://search.cpan.org/search?dist=Scalar-List-Utils
then just
use List::Util qw/min max/;
use Scalar::Util 'dualvar';
and you're set.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 19 Sep 1999 19:05:37 GMT
From: jgd@alpha3.csd.uwm.edu (John G Dobnick)
Subject: Re: builtin.pm
Message-Id: <7s3c61$bhv$1@uwm.edu>
From article <37E51F36.6EF43760@chaos.wustl.edu>, by Elaine -HFB- Ashton <elaine@chaos.wustl.edu>:
> rauznitz balazs wrote:
>
>> Does anyone have this module ? I've been searching it for a week on CPAN
>
> http://search.cpan.org/search?mode=module&query=builtin
Yes, but not helpful, I'm afraid. When I do this, I get the following:
Please notice in the example below that the first command finds
this phantom module named "builtin". Note also that the "readme"
command says it ain't there! Note also that the third example
shows that an actual, existing, module has this extra little
line called "CPAN_FILE" -- something the "buildin" entry is missing.
Perhaps CPAN needs some sort of "link" facility, so that an old
obsoleted entry can contain a "pointer" to it's replacement"?
Perhaps something like
This has been replaced.
Please see List::Util and Scalar::Util.
++ %: perl -MCPAN -e shell
++ cpan shell -- CPAN exploration and modules installation (v1.50)
++ ReadLine support enabled
++
++ cpan> i /builtin/
++ Module id = builtin
++ DESCRIPTION A selection of subs destined for the core
++ CPAN_USERID GBARR (Graham Barr <gbarr@pobox.com>)
++ DSLI_STATUS adcf (alpha,developer,C,functions)
++ INST_FILE (not installed)
++
++
++ cpan> readme builtin
++
++ The module builtin isn't available on CPAN.
++
++ Either the module has not yet been uploaded to CPAN, or it is
++ temporary unavailable. Please contact the author to find out
++ more about the status. Try ``i builtin''.
++
++ cpan> i List::Util
++ Module id = List::Util
++ DESCRIPTION List utilities (eg min, max, reduce)
++ CPAN_USERID GBARR (Graham Barr <gbarr@pobox.com>)
++ CPAN_VERSION 1.00
++ CPAN_FILE GBARR/Scalar-List-Utils-1.00.tar.gz
++ DSLI_STATUS bdcf (beta,developer,C,functions)
++ INST_FILE (not installed)
++
++
++ cpan> exit
++ Lockfile removed.
--
John G Dobnick "Knowing how things work is the basis
Information & Media Technologies for appreciation, and is thus a
University of Wisconsin - Milwaukee source of civilized delight."
jgd@uwm.edu ATTnet: (414) 229-5727 -- William Safire
------------------------------
Date: Sun, 19 Sep 1999 14:05:01 +0000
From: andrij <andrij@mail.idt.net>
Subject: Callin CGI from pull down - HELP !
Message-Id: <37E4ED75.82E26F0A@mail.idt.net>
Hello all.
I need some help and I was hoping some one here can give me some
direction. I have a pull down menu which redirects the user to a
different page when they hit submit (depending on which option they
have selected from the pull down). I am using the following template:
<form method="post" action="redirect.pl">
<select name="url">
<option selected=selected value="">Select one</option>
<option value=http://www.whatever.com/main.html>Whatever</option>
<option value=http://www.anything.com/main.html>Anything</option>
</select>
<input type="submit" value="Submit">
</form>
Where redirect.pl is as follows:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
$url = $FORM{'url'};
print ("Location: $url\n\n");
exit;
_______
The problem I have is that I just realized I need to call cg scripts
instead of just plain html pages in the pull down (eg. <option
value=http://www.whatever.com/main.html> should instead be <option
value=http://www.whatever.com/cgi-bin/script1.cgi>). The scripts I call
gather information from the first first and keep the info as hidden
fields. As you may have guessed, the cgi page is printed correctly, but
none of the form information carries correctly, I suppose because the
scripts are not called directly from the ACTION command.
I am only just learning perl and cgi, so I need some help to make these
run correctly, please help ! I appreciate in advance any help you can
give, and please email if you can. Thanks again all !
-Christine
------------------------------
Date: Sun, 19 Sep 1999 09:07:46 +0100
From: Richard Proctor <Richard@waveney.demon.co.uk>
Subject: Re: CONTEST: Range Searching
Message-Id: <ant190846b49Rr9i@waveney.demon.co.uk>
In article <x7hfkrak4o.fsf@home.sysarch.com>, Uri Guttman
<URL:mailto:uri@sysarch.com> wrote:
> >>>>> "RP" == Richard Proctor <Richard@waveney.demon.co.uk> writes:
>
> RP> Simple, does all 3 jobs before/after/span handles overlapping
> RP> ranges has a few frills (Highlighting the matched line, and line
> RP> numbering - delete if not wanted)
>
>
> this is broken in several ways. it does not handle overlaps as you claim
> and it has the same bugs as other solutions with late matches and
> multiple files.
Ok I accept their was a bug on late matches on multiple files - fixed.
>
> which is not what tom asked for regarding overlaps. it should output
>
On the overlap case I think it is a case of interpretation, but the modified
version behaves as you describe.
> so sorry, try again. merging the overlap and non-overlap logic is not
> trivial. i am close to a very elegant solution. but i will test it to
> death before i publish it here.
Here is published take 2, it resets info between files, only throws the
newline if there is a gap in the output, and prints file name before the
first match in a file, if there are multiple files :
#!perl
# patfind
# written by Richard Proctor
use Getopt::Std;
sub usage {print <<END; exit}
$0 [-m] [-N] [-B lines] [-A lines] [-C lines] /pattern/ [files...]
-m Print indication of matched line
-N Print Line Numbers
-B n Print n lines before the match
-A n Print n lines after the match
-C n Print n lines before and after the match
Slashes on the pattern are optional.
END
getopts('mNB:A:C:') and $pat = shift and @ARGV or usage;
$opt_A = $opt_B = $opt_C if $opt_C;
$pat =~ s!^/(.*)/$!$1!;
foreach $File (@ARGV) {
@Past = ();
$NamePrinted = $ToDo = $Gap = 0;
open (IN,$File) || die "$File would not open $!";
while (<IN>) {
$_ = "$.\t$_" if $opt_N;
if (/$pat/) {
print "\n$File:\n" unless ($NamePrinted++ && $#ARGV);
print "\n" if $Gap;
print @Past;
@Past=();
$Gap = 0;
print ">>>>\t" if $opt_m;
print;
$ToDo = $opt_A;
}
elsif ($ToDo) {
$ToDo--;
print;
}
elsif ($opt_B) {
push @Past,$_;
$Gap = 1, shift @Past if ($#Past == $opt_B);
}
else { $Gap = 1 };
}
close (IN);
}
--
Richard@waveney.demon.co.uk
------------------------------
Date: 19 Sep 1999 13:40:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Converting time() to real date
Message-Id: <slrn7uablh.2ml.abigail@alexandra.delanet.com>
that's my address' Newton (nospam.newton@gmx.net) wrote on MMCCX
September MCMXCIII in <URL:news:37e511d5.33776225@news.nikoma.de>:
$$
$$ 2) Don't do this on early perls unless you have a *lot* of memory, as
$$ they allocate an array of size 2**31 for this (don't know how big that
$$ would be, but my guess is at least 2 GB * sizeof(int) * [some Perl
$$ overhead]... that's a lot of gigs). Later perl5's turn this into a
$$ counting loop.
Since Perl is going to create a table of size 2^31, don't you think even
a later perl5 is going to use quite some memory?
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 11:35:02 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Converting time() to real date
Message-Id: <MPG.124eccb4298961f7989fa6@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7s2ibk$193$1@gellyfish.btinternet.com> on 19 Sep 1999
11:44:52 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On 18 Sep 1999 14:37:22 -0500 Abigail wrote:
> > Craig Vincent (2bunnyhop@home.com) wrote on MMCCIX September MCMXCIII in
> > <URL:news:EXNE3.42790$kL1.516589@news2.rdc1.on.home.com>:
> > () I'm sure this is an incredibly easy function to do...but how do you convert
> > () the return of a time() function to be the actual corresponding date/time?
> >
> > Make a large lookup table.
>
> But the lookup table isnt that hard to make:
>
> for(0 .. 2147483648)
As pointed out by Philip Newton, the upper limit should be 2147483647.
But the lower limit should be -2147483648. Why limit yourself to half
the possible data? Buy a little bit more RAM -- it's cheap these days.
> {
> my @stuff = localtime($_);
>
> push @date_lookup, \@stuff;
> }
>
> print $date_lookup[time()]->[3,4,5];
I get the feeling that you posted this without testing it. For shame!
print @{$date_lookup[time()]}->[3,4,5];
(UNTESTED :-) And that doesn't correct months, has Y2K problems, and
doesn't disambiguate January 11 from November 1, for example. Sheesh!
Please don't publish untested code in the future!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 19 Sep 1999 13:42:03 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CRAP Software
Message-Id: <slrn7uabon.2ml.abigail@alexandra.delanet.com>
lt lindley (ltl@rgsun40.viasystems.com) wrote on MMCCX September MCMXCIII
in <URL:news:7s2qqn$8eu$1@rguxd.viasystems.com>:
== Abigail <abigail@delanet.com> wrote:
== :>George is a Kiboist?
==
== Not in my dictionary nor the allegedly multilingual one I tried
== online. Kibitzer?
No. You might want to try alt.religion.kibology.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 19 Sep 1999 13:45:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CRAP Software
Message-Id: <slrn7uabv9.2ml.abigail@alexandra.delanet.com>
Seth David Johnson (sjohns17@uic.edu) wrote on MMCCX September MCMXCIII
in <URL:news:Pine.A41.4.10.9909190040040.1008306-100000@tigger.cc.uic.edu>:
//
// runs. Sure, the working directory path might be hard-coded into the
// program, but the program will probably be sitting there for eternity
// anyway. :)
//
// And remember, while you may not do this for "serious" projects, think of
// all the quick-and-dirty-and-probably-slightly-buggy-in-certain-contexts
// Perl scripts you've written for one-shot tasks.
I just fail to see the connection between "sitting there for eternity" and
"one-shot tasks".
// Or is it just me? ;)
I guess so.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 19:00:08 +0100
From: Dave Eastabrook <news@elmbronze.demon.co.uk>
Subject: Re: CRAP Software
Message-Id: <EagKUAAoSS53EwMh@elmbronze.demon.co.uk>
on Sun, 19 Sep 1999 Neil <neil@pacifier.com> wrote
>
>> JS> 'A young woman walks into a bar and asks the barman for a double
>> JS> entendre so he gave her one'
>
>> one what?
>
>I think the idea is that she asked for a *double* but only got *one*.
Man walks into a bar. "Ouch". It was an iron bar.
:Dave [just like that!]
--
Ain't Y2k hilaryarse - http://www.elmbronze.co.uk/year2000/humour/
Dave Eastabrook; all anonymous donations gratefully acknowledged.
Major credit cards welcome, secure payment facility is on the way.
------------------------------
Date: Sun, 19 Sep 1999 11:39:58 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: Help me please
Message-Id: <37E52DFE.F5BD455B@synopsys.com>
Hi Frenzy,
Frenzyr wrote:
> hia all, i have a question, i have a script and can't figure out why it's
> not working
>
> (script deleted)
The script you sent has a lot of problems. Try this one instead:
#!/usr/local/bin/perl-5.004 -Tw
# mail.cgi
# version - 1.0
# author: Dav Amann (dove@synopsys.com)
# This program is a very basic mail program. You can use this to send
# the results of a form to anyone.
# The -w and -T flags are real important. The -w flag outputs
# warnings about possible errors in your Perl code. This saves a lot
# of time in trying to track down bugs.
# The -T flag forces "taint" checks to be turned on so you can test
# them. This is good whenever programs are being run on another's
# behalf. Check out the "Cooperating With Strangers" section of the
# Perl Programming book (p. 355)
use strict;
# use strict enforces some restrictions in how you write you perl
# code. In particular, use strict forces you to declare variables
# (among other stuff). If you don't,you'll get an error. This helps
# you catch things like typos in your variables and such. In general,
# it's a good idea to use strict.
# Libraries Needed
use CGI qw/:standard :html3 :netscape/;
use CGI::Carp qw(fatalsToBrowser carpout); # This little thing is
# helpful because it will
# send a lot of the errors
# in your perl script
# directly to the
# browser. It won't send
# everything, so it's
# worthwhile to run your
# cgi from the command
# line as well.
$ENV{PATH} = '/bin:/usr/bin'; # This is to accomodate the -T switch.
&send_mail;
&print_confirmation;
sub print_confirmation {
# You can use this subroutine to print out whatever html you want.
# This one just redirects the script to a static confirmation
# page. If you want to print dynamic info, you could put it here.
my $url = "http://wwwin.synopsys.com/~dove/examples/fb.html";
print "Location: $url\n\n"
}
sub send_mail {
# You can set any of the variables below to something sent by the
# browser by using the 'param' method of the CGI module. For
# example, if you have input field in your form named 'subject',
# you can set the $SUBJECT variable as follows:
# my $SUBJECT = param('subject');
my $SENDER = "dove";
my $TO = "dove\@synopsys.com";
my $FROM = "dove\@synopsys.com";
my $SUBJECT = "Thank you for filling out the Web Form!";
my $MAILCOMMAND = "/usr/lib/sendmail $SENDER";
open(MAIL, "|$MAILCOMMAND")
or die "Can't open $MAILCOMMAND: $!\n";
print MAIL "To: $TO\n"
or die "Can't print to $MAILCOMMAND: $!\n";
print MAIL "From: $FROM\n"
or die "Can't print to $MAILCOMMAND: $!\n";
print MAIL "Subject: $SUBJECT\n\n"
or die "Can't print to $MAILCOMMAND: $!\n";
# Notice the two carriage returns separating the mail headers from
# the body.
print MAIL " Put your mail body message here."
or die "Can't print to $MAILCOMMAND: $!\n";
close (MAIL)
or die "Can't close $MAILCOMMAND: $!\n";
}
Hope this helps,
-=dav
------------------------------
Date: 19 Sep 1999 13:49:01 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to chown and chmod
Message-Id: <slrn7uac5o.2ml.abigail@alexandra.delanet.com>
Elaine -HFB- Ashton (elaine@chaos.wustl.edu) wrote on MMCCX September
MCMXCIII in <URL:news:37E52186.BA480246@chaos.wustl.edu>:
:: Abigail wrote:
:: > {} Is there anything that I can put at the end of my result.cgi that will
:: > {} give me ownership of the result.txt that the script generates, and also
:: > {} chmod it to 755?
:: >
:: > No [1]. And yes. Why you cannot do the first is a question for a unix group
:: > How to do the latter is explained in the manual, in the section about chmod
::
:: Don't forget to mention File::chmod darling. :)
Yeah, well, then there's also the PPT version of chmod. Written by
someone we both know.
Abigail
--
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 19 Sep 1999 14:35:54 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: List files in a dir
Message-Id: <slrn7uaetm.2ml.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCCX September MCMXCIII in
<URL:news:37e4bd79.112761@news.skynet.be>:
;; Pierre-Luc Soucy wrote:
;;
;; >Anybody could tell me how to list the files in a dir and print the
;; >result in an HTML format with PERL?
;;
;; Never mind those regulars. Lots of brilliant people there, but they
;; entertain themselves by giving trivial, working but uninteresting
;; solutions. Here's a code snippet that basically does what you want.
;; I hope. :-)
;;
;; #! perl -w
;; use Cwd; $dir = cwd; # example: current dir
;; opendir(DIR, $dir);
And if the opendir fails?
;; my @list = sort readdir(DIR);
;; closedir(DIR);
;;
;; my %escape = ('<' => '<', '"' => '"');
;; foreach($dir,@list) {
;; s/([<\"])/$escape{$1}/g;
And what are you going to do about the files named: " ", " ", and "\cC" ?
If you're going to dis the 'regulars', better come with something that
indeed really works; there are a lot of allowed characters in filenames
that are *not* allowed in HTML. And since you're using the files names
as anchors as well, you should not only care about HTML escaping, but
about URL escaping as well! I think your solution classifies as a
trivial, uninteresting one that doesn't work.
;; }
;;
;; $" = "\n"; #separate lines
;; print <<"END_OF_HTML";
So, where's the <!DOCTYPE ... > ?
;; <HTML>
;; <HEAD>
;; <TITLE>Directory Listing of $dir</TITLE>
So.... what if $dir eq '<!-->' ?
;; </HEAD><BODY>
;; <H1>Directory Listing of $dir</H1>
;; <UL>
;; @{[map { qq[<LI><A HREF=\"$_\">$_</A>] } @list ]}
Why the urge to escape "? Does an unescaped " do something weird on
your system?
;; </UL>
;; </BODY></HTML>
;; END_OF_HTML
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 18:14:37 GMT
From: euan_woo9431@my-deja.com
Subject: Re: Perl output to browser
Message-Id: <7s3967$1bm$1@nnrp1.deja.com>
It sounds like you might know something useful.
what is localhost defined as (do i have to define it / what drive does
it point to)?
What web server would you recommend installing, all i want it for is
for testing perl scripts.
I don't think i'm asking for too much, hasn't anyone ever bothered to
write something that lets you see how your perl script will behave
without being on-line? It seems like quite an obvious and simple thing
to do.
Whats a read real web browser?
cheers
euan
In article <37DD33A5.4B34B385@networkengines.com>,
jerrad pierce <jerrad@networkengines.com> wrote:
> Ahh yes the joys of integrating everything.
> You're entering a local file path.
>
> Therefore windoze is executing the file, not your web server
> (do you even have one installed?)
> You should be accessing this something like:
> http://localhost/cgi-bin/test.pl)
>
> Don't suppose you bothered to try it in another (read real) web
browser did you? :-P
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 19 Sep 1999 10:58:12 -0700
From: "David Ramos" <davidra@nowonder.com>
Subject: PerlScript/Win32::ASP - Writeblock not found
Message-Id: <qw9F3.11078$iy.329093@newsr1.san.rr.com>
Hello.
I am trying to install PerlScript in ASP on my Win98 system running Apache
1.3.6. I made a simple test script:
<%@ LANGUAGE=PerlScript %>
<HTML>
<HEAD>
<TITLE>PerlScript Hello, World!</TITLE>
</HEAD>
<BODY>
<H1>
<%
use Win32::ASP;
$Response->write("Hello, World!");
%>
</H1>
</BODY>
</HTML>
Why won't this work?
When I run this script, OpenASP returns the error:
**
Apache Active Scripting Runtime Error
Can't call method "writeblock" on an undefined value.
Line #1
**
I changed my
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\ASP\LanguageEngin
es\PerlScript\Write to $main::Response->write(|);
and I changed
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\ASP\LanguageEngin
es\PerlScript\WriteBlock to $main::Response->writeblock(|);
Any ideas?
Thanks
-David Ramos-
davidra@nowonder.com
------------------------------
Date: Sun, 19 Sep 1999 11:13:23 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Some e-mails get sent, some don't
Message-Id: <MPG.124ec792fc9bfced989fa5@nntp.hpl.hp.com>
In article <YL8F3.20213$N77.1601740@typ11.nn.bcandid.com> on Sun, 19 Sep
1999 17:08:08 GMT, Kragen Sitaker <kragen@dnaco.net> says...
...
> Don't allow everything not explicitly forbidden. Forbid everything not
> explicitly allowed. And it probably doesn't have to work for "fred and
> barney"@redcat.com; if someone has chosen such an obnoxious email
> address, they deserve to have things break. (They are not being
> conservative in what they send.)
>
> Something like tr/-A-Za-z@.1-9//cd is quite sufficient.
Underscores and zeros of the world, unite! Send this guy a message!
(But he won't be able to respond. :-()
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 19 Sep 1999 14:06:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Super EASY DB websited with PERL
Message-Id: <slrn7uad6b.2ml.abigail@alexandra.delanet.com>
You're Dead (yurdead@imp.net) wrote on MMCCX September MCMXCIII in
<URL:news:909F3.1841$OT2.57911@wbnws01.ne.mediaone.net>:
** Sorry - this is actually a posting to stop child pornography on the web but
** please read it anyway.
And off-topic postings stop child pornography because of... ?
** There are pictures of children on this news group ranging from
** 12 yrs all the way down to 4 yrs. of age who have clearly been forced into
** perverted and homosexual situations and photographed. It boggles my mind
** that we as a society can let this happen.
Me too. It's such a waste. They would have been better served on a BBQ,
with a nice lemon-mint-thyme sauce.
** People who propagate sexual perversion toward
** children have NO RIGHT TO FREEDOM.
After all, the constitution is for everyone, except those I disagree with.
I think people posting off topic posts have NO RIGHT TO FINGERS!
** Write your fucking senators, send threatening emails, do Something NOW!!!!!!
The only people I would write is the abuse department of your ISP.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 11:45:34 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Using a period as a delimiter in the split() function
Message-Id: <MPG.124ecf212caf23ce989fa7@nntp.hpl.hp.com>
In article <7s2h96$18g$1@gellyfish.btinternet.com> on 19 Sep 1999
11:26:30 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Sat, 18 Sep 1999 15:31:12 -0700 Larry Rosler wrote:
> >
> > You are pointing out a flaw in the evolution of this function: the
> > interpretation of what is syntactically a string to have the semantics
> > of a regex. The frequency of programmer error (often for '|') would
> > indicate the appropriateness of some corrective action.
> >
>
> The '|' was certainly the first one that bit me but that was not to do
> with a misunderstanding of the pattern nature of the first argument but
> ignorance of the metacharacter nature of '|' but then there wasnt a 'perlre'
> manpage in them days ...
The compiler should warn at compile-time about any first argument for
split() that is a string literal (other than a single space, of course,
to preserve the magic).
I seldom see a variable used as the first argument for split(), but
perhaps a run-time warning for that would also be appropriate.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 19 Sep 1999 19:39:45 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Using a period as a delimiter in the split() function
Message-Id: <37E53BFC.E2D74DBA@home.com>
Larry Rosler wrote:
>
> The compiler should warn at compile-time about any first argument for
> split() that is a string literal (other than a single space, of course,
> to preserve the magic).
I agree, though there will probably be a lot of old code generating new
warnings. But it would serve people right for either:
(a) blindly copying code without ever reading the manual
or
(b) using obscure notation that cause people in group (a) to come to
clpm with their confusion.
> I seldom see a variable used as the first argument for split(), but
> perhaps a run-time warning for that would also be appropriate.
I think this would be going too far. There is nothing obscure about
split $pattern, $string, $limit;
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 849
*************************************