[9141] in Perl-Users-Digest
Perl-Users Digest, Issue: 2759 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 29 11:07:12 1998
Date: Fri, 29 May 98 08:00:47 -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 Fri, 29 May 1998 Volume: 8 Number: 2759
Today's topics:
Re: "ref($proto) || $proto" considered harmful (was Re: (Jonathan Stowe)
Re: "ref($proto) || $proto" considered harmful (was Re: <quednauf@nortel.co.uk>
Re: A Email to WWW GaTeWaY, is there such a Thing? <jason@ukpost.com>
Re: Advanced Perl Programming Book (Jonathan Stowe)
Re: Advanced Perl Programming Book (Bbirthisel)
Backquote problem? <Greg.Thomas@atmosenergy.com>
Re: Blat error-code (Jonathan Stowe)
Re: Can't read c:\data (Jonathan Stowe)
Re: Clearly define "free software" birgitt@my-dejanews.com
Control characters <Liznet@cookwood.com>
Re: Control characters <lr@hpl.hp.com>
Re: Converting 31.12.1998 -> 12/31/1998 <jefpin@bergen.org>
Re: Converting 31.12.1998 -> 12/31/1998 <aqumsieh@matrox.com>
Re: cron job via perl ?? scott@softbase.com
Re: cron job via perl ?? (Tina Marie Holmboe)
Re: Don't Know how to decrypt using PERL (Bbirthisel)
Re: Email address checker - comments welcome (Charlie Stross)
Executing a script from html without an HTTP server <blackmon@gate.net>
getpwnam, $gcos <prl2@lehigh.edu>
Re: How can I get the system memory size of my system(L (Janne Moren)
Re: How do I pass multiple parameters to a cgi script f <qdtcall@esb.ericsson.se>
Re: How do I pass multiple parameters to a cgi script f (Jonathan Stowe)
Re: How do I pass multiple parameters to a cgi script f <lr@hpl.hp.com>
Re: how to init three dimentional array using perl <toml@synnet.com>
HOW? : Using MacPERL/Navigator/My Local Machine (Christopher Soeffing)
Re: HOWTO : Perl5/NT user authentication <gay@aspentech.com>
Re: Leap Year Script... <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Leap Year Script... (hymie!)
net::ftp->ls() sloooowwwww <jom@net1plus.com>
Re: PC Screen Image File <aqumsieh@matrox.com>
Re: Perl 5.004 and Make Question (Jonathan Stowe)
Re: Perl 5.004 and Make Question <quednauf@nortel.co.uk>
Re: Perl Win95 Question <camerond@mail.uca.edu>
please help <ilya_shl@mit.edu>
simple question <mvn@euroforum.nl>
Re: Special Variable (again) <lr@hpl.hp.com>
Using the module install scripts from Win32? <jgoldberg@dial-but-dont-spam.pipex.com>
Web Database Connectivity <p-lanphier@psu.edu>
Re: Writing to multiple sockets with select() <vallon@bear.com>
xsub question: XS_pack_$ntype nobody@nowhere.org
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 29 May 1998 13:13:25 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: "ref($proto) || $proto" considered harmful (was Re: OO - explicit package name required)
Message-Id: <356eb174.9031482@news.btinternet.com>
On Fri, 29 May 1998 09:37:30 +0100, F.Quednau wrote :
<snip>
>or should I follow one of the Perl gurus? Well, if something (oopps) someone
^^^^^^^^
>could tell me, why
<snip>
Do you know something about autoresponders here that you want to share
with us ?
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Fri, 29 May 1998 15:09:28 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: "ref($proto) || $proto" considered harmful (was Re: OO - explicit package name required)
Message-Id: <356EC197.A82FEABC@nortel.co.uk>
Jonathan Stowe wrote:
> On Fri, 29 May 1998 09:37:30 +0100, F.Quednau wrote :
>
> <snip>
>
> >or should I follow one of the Perl gurus? Well, if something (oopps) someone
>
> ^^^^^^^^
> >could tell me, why
>
> <snip>
>
> Do you know something about autoresponders here that you want to share
> with us ?
Maybe Eliza's got a daughter...;)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Fri, 29 May 1998 14:06:11 +0000
From: Jason Clifford <jason@ukpost.com>
Subject: Re: A Email to WWW GaTeWaY, is there such a Thing?
Message-Id: <356EC0D3.E3FCF95B@ukpost.com>
Igor wrote:
>
> If you know where I can find email-to-www gateway (a-la Hotmail) so that
> I could read email from my Web Browser via HTTP, please email me.
CWMail from Netwins Limited (www.netwinsite.com)
--
Jason Clifford
Genesis Linux Systems
http://genesis.ukpost.com
------------------------------
Date: Fri, 29 May 1998 13:13:22 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Advanced Perl Programming Book
Message-Id: <356ea7e8.6704694@news.btinternet.com>
On Fri, 29 May 1998 10:31:31 GMT, Paddy Spencer wrote :
>Kello 28 May 1998 14:26:44 GMT, Tom Christiansen <tchrist@mox.perl.com>
>kirjoittanut:
>
>: In comp.lang.perl.misc,
>: "Christopher R. Redinger" <redinger@usm.maine.edu> writes:
>: :Advanced Perl Programming by O'Reilly?? We've been calling it the "Puma
>: :Book." But, I'm not too sure about the accuracy of that one. Any ideas?
>
>: It's actually a black leopard, and we all call it the ``Panther Book''.
>
>Can we call it the "Bagheera" instead?
>
>
Isnt Bagheera portrayed as a slightly bad character in the Jungle Book
? (Or were you thinking of a French sports car?)
When can we look forward to a Mowgli (for confused newbies) and a
Shere Khan (for kindly gurus).
"Trusst in meee..."
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 29 May 1998 13:44:34 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Advanced Perl Programming Book
Message-Id: <1998052913443400.JAA23970@ladder01.news.aol.com>
Hi Jonathan:
>Isnt Bagheera portrayed as a slightly bad character in the Jungle Book
Definately a good guy. Perhapa a bit paternalistic.
>When can we look forward to a Mowgli (for confused newbies) and a
>Shere Khan (for kindly gurus).
"kindly guru" is a bit too polite.
>"Trusst in meee..."
Which is Kaa (who will be portrayed today by $$Bill_G)
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: Fri, 29 May 1998 09:33:58 -0500
From: "Thomas, Greg N." <Greg.Thomas@atmosenergy.com>
Subject: Backquote problem?
Message-Id: <4CE0AF51242AD111BE0F00805F15404E4A662A@dfw1wn05.atmosenergy.com>
> -----Original Message-----
> From: Jan Krynicky [SMTP:JKRY3025@comenius.ms.mff.cuni.cz]
> Posted At: Thursday, May 28, 1998 12:58 AM
> Posted To: misc
> Conversation: Backquote problem?
> Subject: Re: Backquote problem?
>
> Tom White wrote:
> >
> > I'm having problems copying a file with perl.
> >
> > system: HPUX10.20 perl, version 5.004_01
> >
> > $ perl -e '`cp /usr/bin/ls .` || die "$!"'
> > No such file or directory at -e line 1.
> >
> > Actually, the file is copied correctly. I just don't like the error
> I'm
> > getting.
> > Any ideas?
> >
> > thanks
>
> Does the cp provide any output?
> You should reread the manpages to see what `` means.
> I think you wanted to use system() instead.
> perl -e 'system("cp /usr/bin/ls .") || die $!'
>
> BTW, I suppose that you realy mean something different than simple
> copying,
> keep in mind that you may
> use File::Copy;
> copy '/usr/bin/ls','.' || die $!;
>
> Hi, Jenda
------------------------------
Date: Fri, 29 May 1998 13:13:26 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Blat error-code
Message-Id: <356eb2da.9389978@news.btinternet.com>
On Thu, 28 May 1998 18:07:35 -0500, KLL wrote :
>I have the following code to send email. I am using Blat 1.5 which can
>return error codes and messages. One out of maybe ten emails would fail and
>return error 512. However, I did not get anything from $out. I could not
>find out what error 512 is. Where can I find the list of error codes for
>Blat? Any problem in my code? Thank you very much.
>
>$out=`Blat $tmpfile -t $email -s $subject -f $sender -q`;
>if ($?) {
> $out="[error in sending mail]".$out;
> &writeerrorlog($?,$out);
> `kill -f blat.exe`;
>}
>
>
>
>From perl system manpage (goes for backticks too)
The return value is the exit status of the program as returned by
the wait() call. To get the actual exit value divide by 256. See
also the exec entry elsewhere in this document
So you get a return code of 2. What that means however you will have
to take up with the documentation for blat (or its author if the
documentation doesnt help.)
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Fri, 29 May 1998 13:13:23 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Can't read c:\data
Message-Id: <356eab8c.7636991@news.btinternet.com>
On Thu, 28 May 1998 23:46:56 GMT, BlueCoder wrote :
>I am using perl on NT
>When I try to read a directory though cgi on IIS I can't
>read any files in c:\data. When I try to read any other
>directory the script works fine. Same results with both
>the regular perl.exe and the isapi version. Just doesn't
>work for this one directory. Weird.
Does the script work from the command line ? If it does (and perhaps
even if it doesnt) this is not a perl problem but you need to check
the permissions on your directory - specifically that your
IUSR_<WHATEVER> user has permission to read it.
>If you have any ideas email me please.
>
I'm always having ideas and most of those I have about Perl I like to
share with the nice people here. Most of the other ideas I have you
probably wouldnt in your mailbox.
>Here is the script:
>
>print "Content-type: text/html \n\n" ;
>print << "end_of_html" ;
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
><HTML>
><HEAD>
></HEAD>
><BODY>
>end_of_html
>
>opendir(DIR, "c:\\data") ;
>@dir = readdir(DIR) ;
>closedir(DIR) ;
>$dirsize = @dir ;
>
>print "$dirsize<BR>" ;
>
>foreach $d (@dir)
> {
> print "$d<BR>\n" ;
> } ;
>
>print "</BODY>\n" ;
>print "</HTML>\n" ;
>
>
Whilst it might seem a bit much for a trivial (and I mean that in the
best possible taste) script like this, you might want to consider
using CGI.pm as it will make life a little easier when you start with
some larger scripts (although there has been a little discussion here
about its size recently.).
Also you really should always check the success of your opendir .
Infact it is just possible that if you had done something like:
use CGI;
use CGI::Carp qw(fatalsToBrowser);
# This bit left as an exercise to reader
opendir(DIR, "c:/data") || die "Cant open directory - $! ";
# etc
you may have got some diagnostic information which would have answered
your question.
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Fri, 29 May 1998 14:34:22 GMT
From: birgitt@my-dejanews.com
Subject: Re: Clearly define "free software"
Message-Id: <6kmh1e$212$1@nnrp1.dejanews.com>
In article <6kkjgg$o90$3@csnews.cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) wrote:
>
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> pudge@pobox.com (Chris Nandor) writes:
> :Who said anything about substandard? I am talking specifically about
> :making "dumb" software for "dumb" people.
>
> You have to make software be for dumb people. In fact, it has to be
> for *really* dumb people. The proof is obvious. If you made it for
> those merely average people with their soaring brains, you'd lose 50%
> of your market, and Mr $Bill would make very high-pitched keening noises
> as his head popped off. Software must be written for Z=-3 to achieve
> the desired 99.98% market saturation.
>
> --tom
God, grant me the serenity to accept the things I cannot change
(me being *really* dumb)
Courage to change the things I can
(me using *real* smart software without using *real* smart expert's help)
And the wisdom to know the difference.
(blessed be this thread)
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 29 May 1998 09:23:49 -0400
From: Liz Castro <Liznet@cookwood.com>
Subject: Control characters
Message-Id: <356EB6E1.37ACE71D@cookwood.com>
While deciphering someone else's code, I've come across the following:
$val2 =~ s/\cM\n/<BR>/g;
I found a quick reference to \c in the Camel book; it says to use if for
control characters.
So what does \cM mean?
TIA,
Liz
------------------------------
Date: Fri, 29 May 1998 07:08:36 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Control characters
Message-Id: <6kmfhi$r61@hplntx.hpl.hp.com>
Liz Castro wrote in message <356EB6E1.37ACE71D@cookwood.com>...
>While deciphering someone else's code, I've come across the following:
>
>$val2 =~ s/\cM\n/<BR>/g;
>
>I found a quick reference to \c in the Camel book; it says to use if
for
>control characters.
>
>So what does \cM mean?
>
>TIA,
>Liz
"\r" == 015 == 0x0D == carriage return
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Fri, 29 May 1998 10:05:14 -0400
From: Any more mini-dilemmas I should know about? <jefpin@bergen.org>
To: ak <ak@informatik.tu-cottbus.de>
Subject: Re: Converting 31.12.1998 -> 12/31/1998
Message-Id: <Pine.SGI.3.95.980529100021.8280A-100000@vangogh.bergen.org>
>I want to convert european dates to american dates. Has anyone a
>solution for this problem ? Furthermore i need to check a string, if it
>is a correct european date.
The following regex should work:
$usa_date = $euro_date;
$usa_date =~ s {
(\d{1,2}) # this remembers the day
\D # this matches some delimiter
(\d{1,2}) # this remembers the month
\D # this matches some delimeter
}
{
$2 # this puts the month first
/ # this is the /
$1 # then the day
/ # another /
} x; # the x allows for these comments
And that should work nicely :)
--
I was playing poker... with Tarot cards. I got a full house and
half the people died.
- Stephen Wright
-- Jeff Pinyan | users.bergen.org/%7Ejefpin | techmaster@bergen.org --
NYPM | ICQ# 10222129 | 10222129@pager.mirabilis.com | qw[jeff] on EFnet
&jp('"($``','','$)EDF8```','$*52J4```','$+E1G4```','#J``@','#2__`');sub
jp{for$w(@_){$_=unpack('B48',unpack('u',$w));$c=~tr/10/# /;print;}}
------------------------------
Date: Fri, 29 May 1998 10:11:17 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Converting 31.12.1998 -> 12/31/1998
Message-Id: <356EC204.8EDA77FC@matrox.com>
ak wrote:
> Hi !
> I want to convert european dates to american dates. Has anyone a
> solution for this problem ?
You can probably find a module to do this. But a quick and easy way using
regexps would be:
$date = '31.12.1998';
$date =~ s!^(\d+)\.(\d+)\.!$2/$1/!g;
Now, date contains '12/31/1998'.
> Furthermore i need to check a string, if it
> is a correct european date.
That's a tricky one. If the *only* difference between European and
American dates is the . instead of the /, then this is trivial:
if ($date =~ /^\d+\.\d+\.\d+$) {
# it's a european date
} else {
# it is american
}
If European dates are allowed to be separated by slashes and American
dates by dots, then I don;t know of any way to accomplish what you want.
> Thank you for any help
> ak@informatik.tu-cottbus.de
Hope this was helpful.
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: 29 May 1998 11:22:00 GMT
From: scott@softbase.com
Subject: Re: cron job via perl ??
Message-Id: <6km5oo$nnc$2@mainsrv.main.nc.us>
Kerem Yaman (kyaman@earthlink.net) wrote:
> I want to run a cron job on my Linux box to connect to the web at a
> certain time every morning go to my favorite web journals and print out
> some pages off these. (I will have the paper ready of course the
> preivous night.)
Under Windows, this would be trivial: you could use Automation to load
the page in Internet Explorer (I don't think Netscape's browser
supports Automation) and print it in two or three lines of code. (You
could get a free Windows cron clone in Perl from www.skwc.com/essent to
schedule it.)
In UNIX, you'll have to download the page (I wrote a graburl()
subroutine in about 5 minutes), and print it somehow. You'll have to
convert the HTML to a printable format. I don't know if Netscape's
browser has any noninteractive printing capabilities (check their
documentation!). If it doesn't, you'll need a HTML -> something
converter which will convert the HTML you download to a format
that lp can print out.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 29 May 1998 14:31:06 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: cron job via perl ??
Message-Id: <6kmgra$ptm$1@news1.sol.no>
In article <6km5oo$nnc$2@mainsrv.main.nc.us>,
scott@softbase.com writes:
> In UNIX, you'll have to download the page (I wrote a graburl()
> subroutine in about 5 minutes), and print it somehow. You'll have to
> convert the HTML to a printable format. I don't know if Netscape's
> browser has any noninteractive printing capabilities (check their
> documentation!). If it doesn't, you'll need a HTML -> something
> converter which will convert the HTML you download to a format
> that lp can print out.
*Or* one can use html2ps, a *most excellent* tool (dude), which is
able to retrieve a document, and traverse same, and convert to PostScript.
From there on it should be a rather straightforward thing to print it.
http://www.tdb.uu.se/~jan/html2ps.html
--
Tina Marie Holmboe
Application Developer (Geeks'R'Us) [tina@tech.scandinaviaonline.se]
Scandinavia Online AB Development Dept. (+46) 08 587 81000 (switchboard)
(+46) 08 587 81189 (direct)
------------------------------
Date: 29 May 1998 14:09:31 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <1998052914093100.KAA21704@ladder03.news.aol.com>
Hi Larry:
>I have a C compiler on my Unix workstation, the ANSI C manual, Bill
>Plauger's book on the Standard C Library, etc. But the only electronic
>access I have to C library documentation is (believe it or not) via M$
>Visual C++ -- or at least to their idiosyncratic version of it.
Ask your Unix administrator first. In Unixware (2.x anyway) the documentation
was split into optional sections - section "3" was not loaded by default, but
could
be easily added. As I recall, linux was similar. The idea was that this was not
used constantly - so one copy on a network drive was probably enough.
Coherent (with a smaller base command set) actually installed the C Library
documentation by default. Documentation and decent tutorials were that OS's
strong points (lack of networking was part of its downfall).
If someone really DOES need a copy of the crypt(3) manpage, I can send it
via email.
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: Fri, 29 May 1998 14:53:51 GMT
From: charlie@antipope.org (Charlie Stross)
Subject: Re: Email address checker - comments welcome
Message-Id: <slrn6mtj3m.b87.charlie@cs.ed.datacash.com>
In the name of Kibo the Compassionate, the Merciful,
on Wed, 27 May 1998 18:22:24 -0700, Larry Rosler
the supplicant <lr@hpl.hp.com> inscribed:
>
>I disbelieve that you don't know the difference between syntax and
>semantics. Maybe the answer lies in that smiley.
>
>From the original submission:
>
># Check the Email address for basic syntax.
># Returns 1 if valid; 0 if invalid
Yes, but without a bit more than just a simple check to see that the
address _looks_ valid, it isn't that useful, is it?
Have you contemplated the jewel that is Net::DNS and meditated upon
the use of MX records? (It may not be able to prove that there's an
anyone to read the message when it reaches the destination host, but
it can at least see if the local DNS server knows where the message
should be sent.)
-- Charlie
------------------------------
Date: Fri, 29 May 1998 10:35:24 -0400
From: John Blackmon <blackmon@gate.net>
Subject: Executing a script from html without an HTTP server
Message-Id: <356EC7AC.1087A94@gate.net>
Is it possible to execute a script (in Perl or any executable for that
matter) from local HTML on an unconnected machine?
I am looking at creating a product that would exist only in HTML and it
needs to access information from a database from information input into
HTML forms. From what I see, an HTTP server has to process the POST
method on the form. Does anyone know of a way to do this?
(I know this is not really a Perl question, but it seemed like this
would be where I would find people who would know the answer to the
question)
- John
------------------------------
Date: Fri, 29 May 1998 09:58:43 -0400
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: getpwnam, $gcos
Message-Id: <6kmeui$916@fidoii.cc.Lehigh.EDU>
This works:
@passwd = getpwnam($<);
$real_name = $passwd[6], "\n";
but I want to do it in one line, like:
$real_name = ${ getpwnam($<) }[6];
That, of course, doesn't work. Anyone know how to do this?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phil R Lawrence phone: 610-758-3051
Programmer / Analyst e-mail: prl2@lehigh.edu
194 Lehigh University Computing Center
E.W. Fairchild - Martindale, Bldg. 8B
Bethlehem, PA 18018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 29 May 1998 13:38:50 GMT
From: janne@k113.kamnet.lu.se (Janne Moren)
Subject: Re: How can I get the system memory size of my system(Linux)
Message-Id: <6kmdpa$gt5$2@news.lth.se>
mikpf@hotmail.com wrote:
: Thanks,
Just read /proc/meminfo - it should have all data you need.
--
MvH Janne Mr. Janne More4n
(jan.moren@fil.lu.se) Kognitionsforskning
046-222 9758 Kungshuset, Lundagerd
046-211 4973 S-222 22 Lund, Sweden
------------------------------
Date: 29 May 1998 14:51:13 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: How do I pass multiple parameters to a cgi script from the browser?
Message-Id: <ishg295jge.fsf@godzilla.kiere.ericsson.se>
spambait@dragon.erupt.com (Eliot) writes:
> I've been hacking at a Perl script for awhile now, and I can't figure
> out how to pass two parameters to the script at once, i.e.,:
How you pass parameters to a script depends on the operating system
you run it under, and wht you use it for.
> http://my.domain.com/cgi-bin/script.pl?param1
>From this, I guess that you're using you script as a CGI program. So
you just use the normal CGI parameter-passing methods. If you have a
problem with those methods, read some documentation on CGI and/or ask
in a relevant newsgroup (free hint: this is *NOT* a relevant newsgroup).
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: Fri, 29 May 1998 13:13:19 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: How do I pass multiple parameters to a cgi script from the browser?
Message-Id: <356e9605.2125707@news.btinternet.com>
On Fri, 29 May 1998 06:00:52 GMT, Eliot wrote :
>I fail to see how this statement helps me when you could have posted an
>excerpt from or a URL for a FAQ. If you don't want to help, please
>don't waste bandwidth with "Go somewhere else".
>
>In article <Pine.GSO.3.96.980528222434.3419O-100000@user2.teleport.com>,
>Tom Phoenix <rootbeer@teleport.com> wrote:
>>On Fri, 29 May 1998, Eliot wrote:
>>
>>> Subject: How do I pass multiple parameters to a cgi script from the browser?
>>>
>>> I've been hacking at a Perl script for awhile now, and I can't figure
>>> out how to pass two parameters to the script at once,
>>
>>You pass parameters to a CGI script in the same way no matter what
>>language it's written in. The docs, FAQs, and newsgroups about web-related
>>issues should be able to help you with this. Hope this helps!
>>
Hey, Flameboy
Tom *was* helping you. "The docs, FAQs" are installed right there on
your hard disk along with the rest of the perl installation. You
would have got an e-mail when you made your post pointing you to
sources of further information except of course you didnt. The
Mini-FAQ is posted here once a week etc etc etc blah gurgle bark
bark... Tom was not saying "Go somewhere else" he was saying "Look
around you" and I might add that in looking you might learn something
that you would not have done if you had been pointed directly at the
answer and hopefully that learning will go some way to ease "The
burden of the mystery".
/J\
Off the flucloxacillin now so watch out for some bad posts on
saturday.
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Fri, 29 May 1998 07:19:48 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: How do I pass multiple parameters to a cgi script from the browser?
Message-Id: <6kmg6j$rdp@hplntx.hpl.hp.com>
F.Quednau wrote in message <356E7590.F14DD96F@nortel.co.uk>...
...
>http://www.sillydomainname.com/cgi-crap/numbscript.pl?philosopher=plato
+dictator=castro+impatience=eliot
>
>3 parameters, all with a definite meaning :) Flame me if I am wrong.
No flame, but wrong anyhow. '+' represents space. The parameter
separator is '&'.
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Fri, 29 May 1998 08:33:46 -0400
From: Tom Lynch <toml@synnet.com>
Subject: Re: how to init three dimentional array using perl
Message-Id: <356EAB2A.69624225@synnet.com>
John Porter wrote:
>
> By this I assume you mean, "how do I check that all elements are
> zero". Here's a simple way:
>
> $all_zero = 1;
> CHECK_ZERO:
> for ( $in = 1; $in < 13; $in++ ) {
> for ( $shop =1; $shop < 120; $shop++ ) {
> for ( $trans=1; $trans < 100; $trans++ ) {
> if ( $isarray[$in][$shop][$trans] ) {
> $all_zero = 0;
> last CHECK_ZERO;
> }
> }
> }
> }
> if ( $all_zero ) { ...
>
> hth,
> John Porter
Greetings:
I have a follow up question here. Don't you need to do
if ( exists $isarray[$in][$shop][$trans] ) {
This always gets me. You need to check the existents of the
element first before you access. Got this form the Advanced
Perl Programming book. This hash of hashes is what always
gets me. I never get it right the first, second , third.....
Tom
------------------------------
Date: Fri, 29 May 1998 08:19:32 -0400
From: dolph6@jersey.net (Christopher Soeffing)
Subject: HOW? : Using MacPERL/Navigator/My Local Machine
Message-Id: <dolph6-2905980819320001@209.66.12.229>
I have sent the last few hours searching the web, the CD that came with my
PERL 5 book and newsgroups and I still don't have a simple answer to my
question.
For testing purposes I want to run a Perl script inside Navigator on my
machine. I think I need an interpreter that runs on my Mac (like an
interpreter need to be able to run on the same platform as the browser).
I will be using Netscape Navigator (I'll using MS Internet Explorer is
neccessary) and a plain text cgi text file.
So, what do I need ? I have MacPerl 5.1.3r2 and I have been saving my
scripts as text files (so they are interpreted). I have seen options to
save as CGI scripts from within MacPerl, but that saved them as
applications, which I have no idea how to use from within the browser.
Is there an interpreter for the Mac? Where can I find it, and how do I use it ?
Thanks a lot.
---------------------------------------------------------
Please respond to:
dolph6@jersey.net
------------------------------
Date: Fri, 29 May 1998 15:37:30 +0200
From: "Jerome Gay" <gay@aspentech.com>
Subject: Re: HOWTO : Perl5/NT user authentication
Message-Id: <6kmdtq$9qi$1@spy.aspentec.com>
>Why? NT is designed that once the user logs in, that's it, the user
>has free reign over everything on the system which the user has been
>given permission to access. The security model is specifically
>designed for logging in once.
So here's why...
I need to write a basic telnet-like service to which a user can connect
using his NT username/passwd to run a reduced set of commands...
Now I told you why, can you tell me how ?
Cheers /jerome
------------------------------
Date: Fri, 29 May 1998 06:30:53 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Leap Year Script...
Message-Id: <6kmda9$80p@bgtnsc03.worldnet.att.net>
You didn't say what the errors were but I suspect one of them can be
solved by replacing
if ($day eq 0)
with
if ($day == 0)
since $day is going to be numeric.
-- Creede
Billy Strader wrote in message <356E5155.F14AADEC@mindspring.net>...
>OK I am making a script that will subtract one day but I need to
account
>for leap and stuff here is what I ahve but I continue to get sytax
>errors... WHY? if anyone can help me or give me another idea on how to
>do this but I gotta include DST it will be greatly appriacted.
>
>#!/usr/perl
>
>($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
>
>$day = $mday - 1;
>$month = $mon +1;
>$time = localtime(time);
>
>if ($day eq 0) {
> $month = $mon;
> If ($month = '4', '6', '9', '11') {
> $day = "30";
> goto FINISH;
> }
> elsif ($month = '2') {
> If ($year/4 == int($year/4)) {
> $day = "29";
> goto FINISH;
> }
> $day = "28";
> goto FINISH;
> }
> $day = "31";
>}
>
>FINISH: {
> print "Today is $time\n";
> print "yday = $yday\n";
> print "wday = $wday\n";
> print "isdat = $isdst\n";
> print "Time is $hour:$min:$sec\n";
> print "Date is $month-$mday-$year\n";
>}
>
>
>Sincerley,
>
>Billy Strader
------------------------------
Date: 29 May 1998 14:01:52 GMT
From: hymie@lactose.smart.net (hymie!)
Subject: Re: Leap Year Script...
Message-Id: <6kmf4g$in0$1@news.smart.net>
In our last episode, the evil Dr. Lacto had captured our hero,
Billy Strader <straderb@mindspring.net>, who said:
>OK I am making a script that will subtract one day
>($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
Why don't you subtract a day from time() *before* calling localtime?
..hymie! http://www.smart.net/~hymowitz hymie@lactose.smart.net
------------------------------
Date: Fri, 29 May 1998 08:12:36 -0400
From: "Jeremy L. Mordkoff" <jom@net1plus.com>
Subject: net::ftp->ls() sloooowwwww
Message-Id: <356EA634.335B@net1plus.com>
ftp->ls() seems to take 25 seconds to retrieve 2 file names. Is there a
better (faster) way? I'm using libwin32_0.12 on win95.
JLM
--
Jeremy L. Mordkoff
http://www.net1plus.com/users/jom/pictel.htm
------------------------------
Date: Fri, 29 May 1998 10:18:44 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: PC Screen Image File
Message-Id: <356EC3C4.16381191@matrox.com>
info@insyte.com wrote:
> The portion of the file that I want has alphamerics and some limited
> punctuation so I have tried reading this file into an array and doing:
>
> @out_data = (<FILE>);
> $out_data =~ tr /a-zA-Z0-9':+/ /c;
You know that $out_data has nothing to do with @out_data of course. I am
assuming here that you are doing something like:
foreach $out_data (@outdata) {
# bla bla
}
> This does get rid of the non-alphamerics (attributes) but leaves me with
> spaces.
Of course .. that's what you told it to do. If you want to delete those
alphanumerics (without any spaces), you should use the /d modifier
$out_data =~ tr/a-zA-Z0-9':+//cd;
Hope this helps.
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Fri, 29 May 1998 13:13:20 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Perl 5.004 and Make Question
Message-Id: <356ea6e0.6440725@news.btinternet.com>
On Fri, 29 May 1998 01:37:26 -0400, Brian Bitteker wrote :
<snip>
>.. Well, In 5.004 there is no MAKE executable, so how do
>you install modules? What am I missing?
>
dmake
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Fri, 29 May 1998 15:15:48 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Perl 5.004 and Make Question
Message-Id: <356EC313.602F10A5@nortel.co.uk>
Brian Bitteker wrote:
> ...What am I missing?
Yeah, dmake.However, 3 months ago or so it wasn't included in the GS Perl
distribution. The last time I downloaded it (app. 1month ago), dmake was
clearly described in the readme of the GS port and it was included. So if
you downloaded a while ago, I believe that you might not have dmake.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Fri, 29 May 1998 08:09:11 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
To: Shawn <sharmstr@nomail.com>
Subject: Re: Perl Win95 Question
Message-Id: <356EB377.8A74F29A@mail.uca.edu>
[cc'd to s]
Shawn wrote:
>
> [short snip]
> at a command prompt type the following:
>
> set PATHEXT=%PATHEXT%;.pl
>
> This will allow you to type in the name of the script without using the .pl
> extention to run it.
Not on Win95, it won't.
Cameron
camerond@mail.uca.edu
------------------------------
Date: Thu, 28 May 1998 19:15:51 -0400
From: Ilya A Shlyakhter <ilya_shl@mit.edu>
Subject: please help
Message-Id: <356DF027.73D9@mit.edu>
Please help me with the following problem: I need to convert C code
fragments of the form
(SomeType *) IritMalloc(a*b*...*c*sizeof(SomeType)*d*...*e*f)
into
IMALLOC(SomeType, a*b*...*c*d*...*e*f)
while leaving untouched cases where the amount of memory being
allocated is not a simple multiple of sizeof(SomeType), e.g.
(SomeType *) IritMalloc(sizeof(SomeType) + 10)
How can I do this in PERL? Any help would be greatly appreciated.
Please reply directly to ilya_shl@mit.edu.
Thanks!
Ilya
ilya_shl@mit.edu
------------------------------
Date: Fri, 29 May 1998 16:37:40 +0200
From: a <mvn@euroforum.nl>
Subject: simple question
Message-Id: <356EC833.C36BF228@euroforum.nl>
I'm new and using perl4.0m3 for DOS in a dosshell under Win95.
What I want is check for a directory "c:\perl\scripts" and if it's not
there, create it.
How could I do that?
------------------------------
Date: Fri, 29 May 1998 07:27:48 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Special Variable (again)
Message-Id: <6kmgll$rhr@hplntx.hpl.hp.com>
Lance Hollman wrote in message <01bd8ad2$303fe160$67f486cd@myname>...
...
> unless ( ($$iparr[$i] =~ /^\d+$/) && ($$iparr[$i] >=0) &&
>($$iparr[$i] <= 255) ) {
As was pointed out the last time this thread popped up, the second test
is redundant.
Someone else will flame you about the failure of the whole thing to deal
with IP addresses that have only two or three fields. But I won't,
because I've never seen one.
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Fri, 29 May 1998 14:18:28 +0100
From: "Jeremy Goldberg" <jgoldberg@dial-but-dont-spam.pipex.com>
Subject: Using the module install scripts from Win32?
Message-Id: <6kmckn$bij$1@plug.news.pipex.net>
Is it possible to use the 'install' scripts that seem to come with CPAN
modules? And if not, how do you put the module in? I assume just copying
them into the correct directories would do the job, but better to ask people
who know...
------------------------------
Date: Fri, 29 May 1998 09:58:20 -0400
From: "Patrick Lanphier" <p-lanphier@psu.edu>
Subject: Web Database Connectivity
Message-Id: <6kmf2d$nce@r02n01.cac.psu.edu>
I am looking to put a database on the web and am looking for the best
solution for the future. The options I am currently looking at are Cold
Fusion, Dynamorph, IHTML, HeItML, and possibly Perl which are all or could
be XML related, which I believe is the way of the future. If you have
reviewed these options or know someone who has please give me your input or
email address of the person whom I can contact. If I'm wrong in my
methodology, please let me know.
Thank you for you comments,
Patrick Lanphier
Applied Research Laboratory
The Pennsylvania State University
------------------------------
Date: Fri, 29 May 1998 14:52:26 GMT
From: Justin Vallon <vallon@bear.com>
Subject: Re: Writing to multiple sockets with select()
Message-Id: <x6eyavl5due.fsf@pearl.bear.com>
Sudarsan Sankar <sudarsan.shankar@citicorp.com> writes:
> Is this to do with kernel buffering of the socket (The records are quite
> small, <100 bytes)? Is there a way to turn it off?
Yes. Probably not.
Tom also pointed out that if your reader needs to select(), then
the writer will not write until the reader reads, and the reader
will not read until the writer writes. Deadlock...
> I would be grateful for any suggestions, workarounds, pointers.
If you really want to wait, the client should send a request
for the next record. Even one character (ACK) would be enough.
--
-Justin
vallon@bear.com
------------------------------
Date: 29 May 1998 13:21:24 GMT
From: nobody@nowhere.org
Subject: xsub question: XS_pack_$ntype
Message-Id: <6kmcok$l3s$1@columbine.singnet.com.sg>
xsub newbie question. "make test" returns:
make[1]: Entering directory `/home/me/somedir/sse/SSE/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/me/somedir/sse/SSE/lib'
PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/
perl5/i586-linux/5.00404 -I/usr/lib/perl5 test.pl
1..4
/usr/bin/perl: can't resolve symbol 'XS_pack_charPtrPtr'
Can't load './blib/arch/auto/SSE/SSE.so' for module SSE: Unable to
resolve symbol at /usr/lib/perl5/i586-linux/5.00404/DynaLoader.pm line
166.
at test.pl line 11
BEGIN failed--compilation aborted at test.pl line 11.
not ok 1
make: *** [test_dynamic] Error 2
Why does this evil happen? A grep through /usr/lib/perl5 yields no
subroutine with the name XS_pack_charPtrPtr (except ExtUtils/typemap).
sse is my own work with routines which returns char ** (is it possible
to create xsubs which returns more refined structures?)
p.s. why does "perl Makefile.PL" complaints:
> Checking if your kit is complete...
> Warning: the following files are missing in your kit:
> lib
> Please inform the author.
Can someone give me a quick tutorial of what manicheck does?
Thanks in advance for any kind of help.
Kal
k a l @ p o b o x . o r g . s g
------------------------------
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 2759
**************************************