[9928] in Perl-Users-Digest
Perl-Users Digest, Issue: 3521 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 24 06:01:37 1998
Date: Mon, 24 Aug 98 03:00:17 -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 Mon, 24 Aug 1998 Volume: 8 Number: 3521
Today's topics:
Active Perl and Net::FTP broken <xxxgormxxx@p4.no>
Blat and Filehandle main::MAIL opened only for input (Tony Toews)
Re: Blat and Filehandle main::MAIL opened only for inpu (Sam Holden)
Re: Bourne shell to Perl translator (Paddy Spencer)
CHEAP WEBDOMAINS!!! AS LOW AS $10 A MONTH! (Tigurius)
Re: COBOL and Perl huntersean@hotmail.com
Re: COBOL and Perl (Stefaan A Eeckels)
Re: Help with pattern matching... huntersean@hotmail.com
how can i make the lexer work ? <elouan@usa.net>
Re: how to handle a plsql table returned by a stored pr <hendrik.woerdehoff@sdm.de>
Re: ioctl.pm (Randy Kobes)
Re: Matts counter - suddenly stopped working <jerryp.usenet@connected.demon.co.uk>
Re: O'Reilly CGI problem <dove67@netscape.net>
Re: Outputting to MS Excel file format <dove67@netscape.net>
Re: Perl documentation <masonj@erols.com>
Re: Perl documentation (Larry Rosler)
Re: Send file to user <jhoglund@mirage.skypoint.net>
Re: Taint Question (Abigail)
Re: testing Text::GenderFromName <jbc@west.net>
Re: Turn Perl program into binary <terjekv@ifi.uio.no>
Re: Why dont people read the FAQs (Gary L. Burnore)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Aug 1998 11:15:30 +0200
From: Gorm Haug Eriksen <xxxgormxxx@p4.no>
Subject: Active Perl and Net::FTP broken
Message-Id: <m31zq6bv0t.fsf@tehran.p4inet.no>
I am using the latest activeperl, but it doesn't seem to work with
the Net:FTP package with put commands.
The ip of the host seems right, but the port get set to 0.
OBQs:
Does PerlCOM only come in the Win32 resource kit, or is it available
by download?
Where is the documentation of PerlCOM?
Will it be possible to create objects with a COM interface in another
way besides the PerlCOM (and MS Servlets)?
Anyone know of any good WWW forum for Perl & COM support?
Mhanks,
--
Gorm
WARNING: By removing all the x's in my emailaddress, you also
confirm that you will not use it for commercial advertising.
------------------------------
Date: Mon, 24 Aug 1998 05:36:46 GMT
From: ttoews@telusplanet.net (Tony Toews)
Subject: Blat and Filehandle main::MAIL opened only for input
Message-Id: <35e0fb6b.7286657@news.calgary.telusplanet.net>
Folks
After much trial and error I got Perl running under Win NT 4 and PWS
4. And I got the sample Date and Eureka outputting quite nicely to
the web browser.
So now I try the Perl script and Blat sample 3 I found at
http://hjs.geol.uib.no/Perl/index6.html-ssi#BlatPerlSample3 because
that's exactly what I want to do.
#!/perl -w
$mailprog = "blat.exe ";
$email= "tony\@granite.ab.ca";
$subject = "Form Response";
open(MAIL,"$mailprog") || die print "Cannot open mailprog";
print MAIL "To: $email\n\n";
print MAIL "Subject: $subject\n\n";
Now I'm getting the following error message on each of the lines
printing some text. Being a complete newbie to Perl this confuses me
greatly! <smile>
Filehandle main::MAIL opened only for input at
C:\Inetpub\scripts\sendform.pl line 8.
I'd appreciate any thoughts or suggestions.
Thanks, Tony
----
Message posted to newsgroup and emailed.
Tony Toews, Independent Computer Consultant
The Year 2000 crisis: Will my parents or your grand parents still be receiving
their pension in January, 2000? See www.granite.ab.ca/year2000 for more info.
Microsoft Access Hints, Tips & Accounting Systems at www.granite.ab.ca/accsmstr.htm
------------------------------
Date: 24 Aug 1998 05:54:15 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Blat and Filehandle main::MAIL opened only for input
Message-Id: <slrn6u2007.1vo.sholden@pgrad.cs.usyd.edu.au>
On Mon, 24 Aug 1998 05:36:46 GMT, Tony Toews <ttoews@telusplanet.net> wrote:
>Folks
>
>After much trial and error I got Perl running under Win NT 4 and PWS
>4. And I got the sample Date and Eureka outputting quite nicely to
>the web browser.
>
>So now I try the Perl script and Blat sample 3 I found at
>http://hjs.geol.uib.no/Perl/index6.html-ssi#BlatPerlSample3 because
>that's exactly what I want to do.
>
>#!/perl -w
>
>$mailprog = "blat.exe ";
>$email= "tony\@granite.ab.ca";
>$subject = "Form Response";
>
>open(MAIL,"$mailprog") || die print "Cannot open mailprog";
It might help to open a pipe to the program rather than trying to open a file
called blat.exe...
open(MAIL,"|$mailprog");
> print MAIL "To: $email\n\n";
> print MAIL "Subject: $subject\n\n";
>
>Now I'm getting the following error message on each of the lines
>printing some text. Being a complete newbie to Perl this confuses me
>greatly! <smile>
>
>Filehandle main::MAIL opened only for input at
>C:\Inetpub\scripts\sendform.pl line 8.
And look perl told you exactly what was wrong anyway...
Sam
------------------------------
Date: Mon, 24 Aug 1998 08:53:22 GMT
From: paddy.spencer@parallax.co.uk (Paddy Spencer)
Subject: Re: Bourne shell to Perl translator
Message-Id: <903948803.22654@red.parallax.co.uk>
Kello Wed, 19 Aug 1998 22:43:23 GMT, aml@world.std.com (Andrew M.
Langmead) kirjoittanut:
: There is no automated way of converting shell scripts to perl. Since
: the shells spend most of their time calling other programs, it would
: either have to re-implement all of those programs in perl, or call all
: of them. If it simply called all of the programs that a shell script
: did, it would be no more {efficient,secure,maintainable,whatever} than
: the shell script. If it re-implemented all of the commands in perl,
: (never mind the amount of work that it would take.) it would still be
: awkward and inefficient because the way a programmer does things in a
: shell script is very different than perl (or just about anything
: else.)
There is one occasion where this would be useful, though: on my platform
we have Perl, but don't have <insert prefix>sh. So running configure
when porting GNU software is a tad tricky...
I briefly looked into porting a shell (can't remember which one) but the
installation instructions went:
INSTALLATION
============
Type
./configure
then
make install
which didn't really help :-|
--
Paddy Spencer
Parallax Solutions Ltd (http://www.parallax.co.uk/)
------------------------------
Date: Mon, 24 Aug 1998 09:53:25 GMT
From: tigurius@shaw.wave.ca (Tigurius)
Subject: CHEAP WEBDOMAINS!!! AS LOW AS $10 A MONTH!
Message-Id: <35e144ce.39032240@news.cal.shaw.wave.ca>
cheapest domains you will ever find in Canada OR the US!!! as low as
$10 for the basic service or $20 a month for advanced users!! whats
the difference? basic only gets www.yourname.com and 50mb of webspace
and 1 email!!!
advanced gives you:
unlimited diskspace
unlimited Data Transfer
dedicated IP
5 Email/FTP Accounts
unlimited Email Aliases
Full CGI Access (for both basic and advanced)
Form Mail
Banner Rotation
Search Engine
Graphics Counter
Free 4 All Links
WWW Board
Password Protection
Shopping Cart
Whois Lookup
Logs
InterNIC Registration
Daily Backups (for basic and advanced)
email Tigurius@hotmail.com for more information!!!! (please do not
send any hate mail or anything like that but iam sorry for any
inconvience i have caused)
------------------------------
Date: Mon, 24 Aug 1998 08:33:17 GMT
From: huntersean@hotmail.com
Subject: Re: COBOL and Perl
Message-Id: <6rr8ge$5a9$1@nnrp1.dejanews.com>
In article <6rldhj$na5@lotho.delphi.com>,
paulr@bix.com (paulr) wrote:
>
> Well, sure, you can rewrite a COBOL program in PERL. It
> may be incomprehensible to you six days later, but you can
> do it.
It may be incomprehensible to you if you write it in a really stupid
obtuse fashion and suffer amnesia and forget everything you knew about perl.
Just because a language isn't verbose doesn't mean it has to be difficult to
maintain. I have written thousands of lines of perl in my years as a
professional programmer, and not only can I assure you that they are all
comprehensible, and I am happy to support them all.
>
> PERL does not have the built in database capabilities that
> COBOL has, so you will find it more difficult to do the
> same tasks in PERL that COBOL excels in.
This is pure drivel. Perl has, via the various db-specific modules and the
ability to tie data structures to db files, the richest database
functionality of any language I've ever used/seen. I work for a large
international investment bank. We have a _huge_ IT requirement, ranging from
real-time feeds to settlement, volatility, risk assesment, live trading etc
in many markets worldwide. We have millions of lines of inhouse code. Some
in C++, some in perl. Some even (*blush*) in VB. I write stuff every day in
perl that deals with our databases (we have many) in every conceivable
situation. There is no code whatsoever written in COBOL. Zilch. Nada. Not
one line.
> On the other paw,
> I sure wouldn't use COBOL for a text scanning or SGML
> application. <grin>
Neither would I. I wouldn't use COBOL for anything else, either. Neither do
the company I work for, nor any of the major banks here in London AFAIK.
>
> If you have started into C, then go ahead into PERL.
> You will find COBOL is a very different world than either of
> those two languages, but a very rewarding one to learn.
> In fact, learning ANY programming language is a rewarding
> experience.
Amen to that sentiment. Perhaps if you tried to learn something about perl
before posting you would not post such utter nonsense to the usenet.
>
> -Paul
>
>
Sean Hunter
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 24 Aug 1998 08:18:45 GMT
From: Stefaan.Eeckels@ecc.lu (Stefaan A Eeckels)
Subject: Re: COBOL and Perl
Message-Id: <6rr7l5$g8q$1@justus.ecc.lu>
In article <6r7tk8$3ql$1@client3.news.psi.net>,
abigail@fnx.com (Abigail) writes:
>
> COBOL was together with FORTRAN one of the first high level languages.
> It dates from the late 40's/early 50's. Perl was developped 40 years
Late fifties, Abigail.
> later. COBOL was a major achievement in its time, and developped by
> a remarkable woman, Admiral Grace Hopper.
Indeed she was (BTW, she retired as rear admiral). In 1952, she developed
the first compiler (A-0), and in 1953, the first compiler to handle
symbolic manipulations (A-2). Her Flow-o-matic compiler (1957) was
a direct precursor to COBOL. Work on Cobol started in 1959, when Dr
Hopper initiated a sequence of events that led to the
'Initial specifications for a Common Business Language
(DOD, April 1960)'.
COBOL compilers were becoming widely available by 1964, so Perl
is about a quarter century younger than COBOL.
> Perl was developped by a
> remarkable man, Larry Wall. But where Hopper was a pioneer, Wall had
> 40 years of experience and gaining knowledge to work with.
>
> That is why Perl is Perl, and nowhere near close to COBOL.
Wow!
> That's also why COBOL isn't suitable for modern programming.
Why not? The language hasn't remained static since the sixties,
and 'modern programming' has nothing to do with language, but
with the approach to analysis, design and coding. The choice
of language can influence the efficiency of the coding phase,
but on the whole has very little influence on the quality of
the finished product. The only really negative effect I've
ever seen is the use of langauges that haven't stabilized
(such as Ada in 1985, C++ in 1993, or Java in 1998) yet.
You've listened to the siren song of the language designers,
who're trying to justify their foisting new languages on
us 'because with *this* language even a moron can write
good programs'. COBOL was one of the first languages that
claimed this (the morons being the managers). Bjarne
Stroustrup has made such claims for C++ too.
Plus ca change...
--
Stefaan
--
PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
Perfection is reached, not when there is no longer anything to add,
but when there is no longer anything to take away. -- Saint-Exupiry
------------------------------
Date: Mon, 24 Aug 1998 08:59:46 GMT
From: huntersean@hotmail.com
Subject: Re: Help with pattern matching...
Message-Id: <6rra21$6uo$1@nnrp1.dejanews.com>
In article <6rpn6o$g7i$1@nnrp1.dejanews.com>,
kevin@zippy.tnet.com wrote:
> Looking for a bit of help...
>
> I've got strings coming at me like:
>
> /usr/archives/muttusr/1998-08/000024: @436{54} changing...
> xxxxxxxxxxxxxx^^^^^^^x^^^^^^^x^^^^^^xxx^^^x^^xxx...
>
> The above ^^^ areas are significant to me. However the beginning of
> the line could change where it might look like:
>
> /archives/fruits/red/apples/muttusr/1998-08/000024: @436{54} changing...
>
> Where the path is longer but the significant parts are still there. The
> following format for the significant stuff will always be there:
>
> list/archive/article: @position{length}
>
> Just the beginning path may increase or decrease depending on where it
[snippage]
Assuming that the stuff is in $_, the following will work for the cases you've
mentioned:
($list, $archive, $article, $position, $length) =
m|.*/(.*?)/(.*?)/(.*?): @(.*?)\((.*)\).*|;
Keep on regexing!
Sean H
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 24 Aug 1998 07:59:00 GMT
From: "elouan" <elouan@usa.net>
Subject: how can i make the lexer work ?
Message-Id: <01bdcf35$214aabc0$278ffcc1@none.wonadoo.fr>
hi, i canot make the lexer run, each time i tried to run some examples
from the ones given with the module i still have the same error in the
module Alex.pm ! (which i never touch).
i am running perl on a PC with perl 5.003 ( i used Clex instead of Lex ).
thx elouan
>> here is the error message i got
C:\Perl\ParseLex-2.02\examples>tokenizer.pl
Ambiguous use of &{sub{...}} resolved to &sub{...} at
C:\Perl\lib/Parse/ALex.pm
line 26.
Ambiguous use of {caller} resolved to {"caller"} at
C:\Perl\lib/Parse/ALex.pm li
ne 26.
(Did you mean $ or @ instead of &?)
Can't use subscript on subroutine entry at C:\Perl\lib/Parse/ALex.pm line
26, ne
ar "{ caller }"
BEGIN failed--compilation aborted at C:\Perl\lib/Parse/CLex.pm line 9.
BEGIN failed--compilation aborted at
C:\Perl\ParseLex-2.02\examples\tokenizer.pl
line 5.
C:\Perl\ParseLex-2.02\examples>
------------------------------
Date: Mon, 24 Aug 1998 11:47:27 +0200
From: Hendrik Woerdehoff <hendrik.woerdehoff@sdm.de>
Subject: Re: how to handle a plsql table returned by a stored procedure
Message-Id: <35E136AF.1586@sdm.de>
Padma Junuthula wrote:
>
> I wrote a stored procedure which returns a pl/sql table. My question is how
> to access pl/sql table in perl using dbi. thanks for any responses
First of all have a look in the documentation for your Oracle database.
Check if there is a way to directly access a PL/SQL table via the normal
programming interfaces of Oracle (embedded SQL, OCI, ...). PL/SQL tables
are something completely different from database tables. I can't
remember if there is a way to access them directly from outside PL/SQL.
Then you should read the documentation of your Perl-Oracle interface
(DBD::Oracle). Try to find out if it supports the necessary calls.
If all else fails you could write some PL/SQL code to dump the PL/SQL
table in a proper database table which in turn you can read the usual
way.
Hendrik
--
Hendrik W"ordehoff |s |d &|m | software design & management
| | | | GmbH & Co. KG :
woerdehoff@sdm.de | | | | Thomas-Dehler-Str. 27 >B)
Tel/Fax (089) 63812-337/515 81737 M"unchen :
Nach Paragraph 28 Abs. 3 des Bundesdatenschutzgesetz widerspreche ich
der Nutzung oder Uebermittlung meiner Daten fuer Zwecke der Werbung
oder der Markt- oder Meinungsforschung.
------------------------------
Date: 24 Aug 1998 04:51:04 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: ioctl.pm
Message-Id: <slrn6u1sot.dd.randy@theory.uwinnipeg.ca>
On Fri, 21 Aug 1998 23:07:51 GMT,
Donald WHIZZARD Lambert <dlambert@sangacorp.com> wrote:
>Hello I am looking for the perl module ioctl.pm, I was told I could find
>it from CPAN,
>however I have not been able to locate it.
Hi,
Perhaps you're looking for Ioctl-0.7.tar.gz, which is under
http://www.perl.com/CPAN/authors/id/KJALB/
--
Best regards,
Randy Kobes
Physics Department Phone: (204) 786-9399
University of Winnipeg Fax: (204) 774-4134
Winnipeg, Manitoba R3B 2E9 e-mail: randy@theory.uwinnipeg.ca
Canada http://theory.uwinnipeg.ca/
------------------------------
Date: Mon, 24 Aug 1998 09:02:28 +0100
From: Jerry Pank <jerryp.usenet@connected.demon.co.uk>
Subject: Re: Matts counter - suddenly stopped working
Message-Id: <3zEC5KAU4R41Ew5I@connected.demon.co.uk>
In <comp.lang.perl.misc>
Mark-Jason Dominus <mjd@plover.com>, writes:
>
>In article <6r0bov$leq$2@client3.news.psi.net>,
>Abigail <abigail@fnx.com> wrote:
>>Finally a sensible program from Matt! A counter that doesn't move!
>
>
>Isn't that a nice idea? I've had one on my home page for a few months
>now. I forget what number it shows, but it's a big, impressive one,
>and since it's just a gif file it loads more quickly than other
>counters that do change.
Why would you want to write a hit counter when Perl already has one
built in?
# *big* hits
print time();
# for the more modest
print int(time()/2000);
:-)
-- Jerry Pank mailto:jerryp.usenet@netconnected.com
Just remember: when you go to court, you are trusting your fate to
twelve people that weren't smart enough to get out of jury duty.
-- (Tom C. c.l.p.m recently)
------------------------------
Date: Sun, 23 Aug 1998 23:56:13 -0700
From: David Amann <dove67@netscape.net>
To: seamusc@geocities.com
Subject: Re: O'Reilly CGI problem
Message-Id: <35E10E8C.D45B2ED0@netscape.net>
Hi Seamus,
Copied and ran this script under my Apache server and all worked fine.
Here are some things you can try.
1. Check the permissions. You need to make sure this script can be run
by everyone. (chmod a+x example.pl)
2. Add the following to your CGI script.
use CGI::Carp qw(fatalsToBrowser carpout);
open (LOG, ">>error.log") || die "couldn't open log file: $!\n";
carpout(LOG);
This should send some more graceful error messages to the browser.
3. su to the user running as webserver (usually nobody) and run the
script from there.
4. Make sure the pathing all works out. Is CGI.pm and such in the right
place?
Hope this gives you a hand.
-=dav
Seamus J. Cranley wrote:
> Netscape 4.06 says, "Internal Server Error, etc...."
> My http error log says, "Premature end of script headers"
> I have RedHat linux 5.1 on two computers. The errors occur on both.
> I am using Perl 5.004
> The script runs fine from the command line.
>
> Here is the CGI script, straight out of the book.
>
> #ex_19-1
> #Learning Perl Appendix A, Exercise 19.1
> use strict;
> use CGI qw(:standard);
> print header(), start_html("Add Me");
> print h1("Add Me");
> if(param()) {
> my $n1 = param('field1');
> my $n2 = param('field2');
> my $n3 = $n2 + $n1;
> print p("$n1 + $n2 = <strong>$n3</strong>\n");
> } else {
> print hr(), start_form();
> print p("First Number:", textfield("field1"));
> print p("Second Number:", textfield("field2"));
> print p(submit("add"), reset("clear"));
> print end_form(), hr();
> }
> print end_html();
>
> All the other examples worked, except the one right after this one in
> chapter 19 exercises.
>
> Thanks for your help.
------------------------------
Date: Sun, 23 Aug 1998 23:58:17 -0700
From: David Amann <dove67@netscape.net>
To: jonathan white <jwhite@accesshub.net>
Subject: Re: Outputting to MS Excel file format
Message-Id: <35E10F09.3D02F118@netscape.net>
Hi Johnathan,
What I usually do is send a 'Content-type:application/excel\n\n' line and
then send a bunch of tab separated text. Excel seems to read it in pretty
good from there.
Hope this helps,
-=dav
jonathan white wrote:
> I'm looking to converting some of my reporting to Perl on UNIX. Many of
> my reports need to go out in Excel format. Are there any Perl libraries
> to write to MS Excel file format? Has anybody had good luck with them?
>
> TIA
> jonathan
------------------------------
Date: Mon, 24 Aug 1998 02:29:42 -0400
From: "John Mason Jr" <masonj@erols.com>
Subject: Re: Perl documentation
Message-Id: <6rr1ci$jn0$1@winter.news.erols.com>
David,
You might find the new version of perl from Activestate useful it has all
the docs in one place.
John
------------------------------
Date: Mon, 24 Aug 1998 00:46:51 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl documentation
Message-Id: <MPG.104aba40abc315059897e5@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6rq71m$224$2@client3.news.psi.net> on 23 Aug 1998 23:02:14
GMT, Abigail <abigail@fnx.com> says...
> David Hawker (dhawker@bigfoot.com) wrote on MDCCCXVIII September MCMXCIII
> in <URL: news:35e53e7f.14559031@news.cableol.net>:
> ++ On Sat, 22 Aug 1998 17:51:41 -0700, lr@hpl.hp.com (Larry Rosler) felt the
> ++ need to post:
> ++
> ++ >[Posted to comp.lang.perl.misc and copy mailed.]
> ++ >
> ++ >In article <6rnmno$8na$2@client3.news.psi.net> on 23 Aug 1998 00:11:36
> ++ >GMT, Abigail <abigail@fnx.com> says...
> ++ >...
> ++ >> Uhm, what system comes without documentation for its system calls?
> ++
> ++ The one I'm using: MS-DOS and Windows95.
>
> Then complain to the vendors for shipping a system without documentation.
> Would you buy a TV without a manual too, and then complain the TV guide
> doesn't have instructions on how to operate your TV?
Your analogy is quite appropriate; your use of it is quite fallacious.
When I buy a TV, *with* a manual, the manual contains instructions on how
to operate the TV, as well as a few fixes for simple problems that do not
require special tools or expertise to remedy (such as, make sure it is
plugged in to a live power source). Similarly with MS-DOS and Windows.
When something more serious goes wrong with the TV, I must either *pay*
someone to fix it, or *pay* for appropriate tools and a repair manual so
I can do it myself. Similarly if I want to customize the TV in any way.
Similarly with MS-DOS and Windows.
For an OS, the tools in question may include compilers and assemblers,
documentation on their use, and documentation of OS internals
(specifically including 'system calls'). Though these may have been
bundled into some versions of other OSs, they are of no benefit
whatsoever to ordinary users of the OS, only to *experts* who want to
maintain or to modify the OS -- who should be insightful enough to
understand why vendors might charge extra money for the special tools and
documentation.
I remember clearly the howls when Hewlett-Packard began shipping its Unix
system bundled with a C compiler sufficient to build the system, but not
to do real application development (i.e., not ANSI/ISO compliant). We
charged extra money for that, together with its documentation -- because
it cost us extra money to develop and support them. Similarly with MS-
DOS and Windows.
You, Abigail, are insightful enough to understand and to teach computer
algorithms. Yet you profess to be obtuse regarding computer economics.
This cannot be due to irrationality, so must be due to prejudice.
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 24 Aug 1998 09:48:24 GMT
From: Jamie Hoglund <jhoglund@mirage.skypoint.net>
Subject: Re: Send file to user
Message-Id: <6rrct8$fl3$1@shadow.skypoint.net>
Stathy Touloumis <stathy@jaske.com> wrote:
: Hi,
: I have a script that verifies a user. I would now like to be able to
: send that user a file through a web browser out of the the web servers
: path. Is there an easy way to do this? I tried just opening the file
: and printing out the contents but it then named the file the name of the
: script. I would like to retain the name of the file.
: Thanks
It can be tricky....
Probably more of a cgi / mime and browser question than a perl question
though. Ultimately, it's just data, you're trying to tell the browser what
name to assign to the data.
There are a few ways, here are some that I've toyed with:
1.) Issue a "Location:" header
Direct them to the named file. This has a side effect that they'd be
able to get the file w/out a password.
2.) Use the path-translated
action="/cgi-bin/script.cgi/name_of_file.ext"
This sometimes works. Depends on the browser, can creatively be used
with the Location: to circumvent unauthorized access though.
3.) Use the multi-part mime type, in question is the Disposition: header.
This works with netscape, not with IE. It's a cool when it works
though. :-)
Path-Translated is probably your best bet, as (hopefully) the browser
won't know cgi-bin from anything else, do make sure it spits out the right
mime-type though. (probably application/octet-stream)
Jamie
--
-------------------------------------------------------------------------
jamie@lecart.com
http://www.lecart.com
------------------------------
Date: 24 Aug 1998 05:09:12 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Taint Question
Message-Id: <6rqsho$dap$1@client3.news.psi.net>
Mark-Jason Dominus (mjd@op.net) wrote on MDCCCXIX September MCMXCIII in
<URL: news:6rqo01$frr$1@monet.op.net>:
++
++ The other thing you can do here is something I found etched on the
++ wall in a little cafe in Antarctica:
++
++ # `The Dunwich Horror'
++ sub untaint {(keys%{{$_[0],0}})[0]} # LOD
++
++ Then use $x = untaint($y) or whatever. Larry said that The Dunwich
++ Horror might stop working in future versions of Perl, so you shouldn't
++ actually use it, except to drive people mad with revulsion.
++
++ I mentioned this technique in my security talk on Tuesday, and right
++ away someone wanted to know if it was more efficient than the
++ pattern-matching version.
++
++ I swear, if I had lived to be a thousand, I would never have thought
++ to ask that question.
For some reason, large flocks of people always keep an eye for peep hole
optimizations. I cannot understand why - maybe they just cannot grasp the
bigger picture.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Mon, 24 Aug 1998 02:43:42 -0700
From: John Callender <jbc@west.net>
Subject: Re: testing Text::GenderFromName
Message-Id: <35E135CE.C88CB595@west.net>
I've done some fiddling, and some more testing, with the
Text::GenderFromName module. The fiddling I did was to modify the
original module to create two variations:
* variation "a" restores the "default to male" behavior turned off by
Jon Orwant in his update of the original awk script.
* variation "b" not only has the "default to male" behavior, but also
includes a hash of uniquely male and female names based on the Social
Security card application data mentioned in my earlier article, with
lookups being done on the hash before resorting to the module's current
rules.
I also tracked down two other lists of male and female names for
testing. The first of the two was from:
http://www-cgi.cs.cmu.edu/afs/cs/project/ai-repository/ai/areas/nlp/corpora/names/
It seems to be something in connection with a CMU AI project, but I'm
not sure exactly where the names come from.
The second is a US Census report based on 1990 census data, listing the
most common male and female first names. The source files are at:
http://www.census.gov/genealogy/names/
Anyway, here's the results of running the original version of the
module, as well as both new versions, against all three pairs of name
files. "total" means the total number of names in the file, while the
"orig.", "ver. a", and "ver. b" columns give the percentage of correct
identifications.
Data file total orig. ver. a ver. b
SSN male 1195 13.1 82.4 95.9
SSN female 1655 84.3 84.3 95.4
CMU AI male 2943 12.3 74.9 76.4
CMU AI female 5001 84.5 84.5 85.4
Census male 1219 15.0 83.3 87.6
Census female 4275 82.0 82.0 83.5
The hash lookups in version b help a lot on the SSN files, of course,
but that's hardly surprising since I hardwired the identification of all
the uniquely male and female names in those files into the module. The
lookups still helped a bit, though, on the other two sets of files. And
it seems pretty clear that the "default to male" behavior is important,
at least in the module's current state of development, for accuracy in
identifying male names.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 24 Aug 1998 10:25:24 +0200
From: Terje Kvernes <terjekv@ifi.uio.no>
Subject: Re: Turn Perl program into binary
Message-Id: <wxx4sv2zszv.fsf@andvarefoss.ifi.uio.no>
fl_aggie@thepentagon.com (I R A Aggie) writes:
> In article <wxxaf4x919f.fsf@gladsheim.ifi.uio.no>, Terje Kvernes
> <terjekv@ifi.uio.no> wrote:
>
> + like:
> + $pass = "XrdKIkaN/ucs4";
> + chomp($try = <>)
> + if ($try eq $pass) {
> + let's go!
> + }
> +
> + or am I missing something here?
> +
>
> Yeah, like encrypting $try before comparing it to an encrypted password...
>
> James - :)
*blush*
Right.
I must have been awfully tired. But the above version would be quite
safe, until someone figured out what happened... ,-)
*sob*
--
Terje Kvernes
http://www.stud.ifi.uio.no/~terjekv/
------------------------------
Date: Mon, 24 Aug 1998 05:56:37 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Why dont people read the FAQs
Message-Id: <35e20064.18430173@nntpd.databasix.com>
On Mon, 24 Aug 1998 04:49:07 GMT, in article
<35e2eabb.135535060@news.mmc.org>, drummj@mail.mmc.org (Jeffrey Drumm) wrote:
>On Sun, 23 Aug 1998 17:51:57 GMT, gburnore@databasix.com (Gary L. Burnore)
>wrote:
>
>(deletia)
>
>>The poster to which Abigail responded to so rudely only asked a question.
>>Lvirden on the otherhand followed up to my posts with a smartassed tone
>>suggesting that I was at fault for posting 7 or 8 times. I responded in
>>kind. If someone abigail had been the victim of the post above I'd have not
>>only EXPECTED her to reply in kind, I'd have supported it.
>
>lvirden's post, as quoted in your reply:
>
>>>I sure wish folk WOULD wait a few weeks instead of sending 7, 8 or more
>>>copies of the same posting to this newsgroup.
>
>Now, *I* read this, and saw lvirden making a general comment about posting
>multiple copies of articles, and *I* chose to believe he either didn't
>check the headers or was uneducated as to the workings of Usenet. Not a
>crime in my book, and certainly nothing to warrant something like "stfu."
>
>You apparently chose to believe that he was being rude for rudeness' sake,
>and responded with knee-jerk abusiveness. A simple misunderstanding that
>generated a naive question on his part automatically produced abuse on
>yours . . . does this not sound eerily familiar?
It wasn't a misunderstanding and no, it's nothing like abigails abuse of a new
poster.
>
>>>If you can't be bothered to practice what you preach, how can you possibly
>>>expect anyone to take you seriously?
>
>>If you can't be bothered to at least try to understand what you read, why
>>should I care.
>
>Sigh. Pointlessly combatative and (unfortunately) predictable. I guess I
>should thank you for so tidily reinforcing my point.
What you should do is killfile gburnore@databasix.com as I do not change my
address.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3521
**************************************