[12893] in Perl-Users-Digest
Perl-Users Digest, Issue: 303 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 29 21:07:14 1999
Date: Thu, 29 Jul 1999 18:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 29 Jul 1999 Volume: 9 Number: 303
Today's topics:
Re: Book "Perl Annotated Archives" Good?Bad? <cassell@mail.cor.epa.gov>
Re: Book "Perl Annotated Archives" Good?Bad? (Tad McClellan)
Re: Calling C from Perl <duraipPLEASE_REMOVE_THIS@extendsys.com>
Re: Calling C from Perl <cassell@mail.cor.epa.gov>
Re: Comparing Scalars <cassell@mail.cor.epa.gov>
Re: Creating dynamic GIF-s from CGI-script <ron_savage@non-hp-australia-om5.om.hp.com>
Re: File maintenance algorithm required <cassell@mail.cor.epa.gov>
Re: form, binary attachments <again> (elephant)
Re: GET, but starting at byte 5000, and just get 2000 b (brian d foy)
Re: Help install <cassell@mail.cor.epa.gov>
Re: How to copy a file to another name in same directo <cassell@mail.cor.epa.gov>
Re: How to determine a date in the past (elephant)
How to read the submit button as a name or value <v0xman@yahoo.com>
Re: How to read the submit button as a name or value <tchrist@mox.perl.com>
Re: How to trim a String <uri@sysarch.com>
Re: Information on Search Engines (brian d foy)
Invoing Perl script on Remote NT machine prem_g@technologist.com
Re: Login script, help please (brian d foy)
Modules for Dummies <warish@concentric.net>
Re: OOP question. (Eugene van der Pijll)
Re: Perl doc'ing (think of Jabberwocky) <cassell@mail.cor.epa.gov>
Re: Refresh problem coming out of Perl script (elephant)
Re: running Perl and Linux from a boot-cd? (elephant)
Re: Use of uninitialized value at ...... warning with h <cassell@mail.cor.epa.gov>
Re: using sendmail in .pl <cassell@mail.cor.epa.gov>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 29 Jul 1999 16:20:31 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Book "Perl Annotated Archives" Good?Bad?
Message-Id: <37A0E1BF.C6524464@mail.cor.epa.gov>
Randal L. Schwartz wrote:
> [snip]
> I picked it up a while back. It's halfway between MattWright and
> a good book. Reinvents a lot of wheels. Calls Perl programs "foo.pl".
Halfway between Matt wright and a good book?
Is that Perl Purgatory?
> Parses its own QUERY_STRING instead of using CGI.pm. Even says in a
But does it do the parsing *correctly* ?
> [snip]
> Other than that, the code looks reasonable, and the comments look
> reasonable.
Well, that's more than I've seen in some other so-called
computer texts. Is someone putting a review of this up on
Tom's critiques page?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 29 Jul 1999 14:09:04 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Book "Perl Annotated Archives" Good?Bad?
Message-Id: <0c5qn7.mdq.ln@magna.metronet.com>
Uri Guttman (uri@sysarch.com) wrote:
: >>>>> "GS" == Gregg Silk <greggsilk@aol.com> writes:
: GS> I see that Costco has "Perl Annotated Archives" by Martin Brown. I
^^^^^^^^^^^^^^^
Thought that name looked familiar...
: GS> looked pretty useful to me, but does anyone have opinions on its
: GS> accuracy and quality? Gregg
: from what i can find on the net (which you should have done yourself) i
: can tell you very little. only one review at amazon, no code examples
: and its publisher osborne/mcgraw-hill is not known for their computer
: book quality especially in the perl world.
I can do better than that.
I remember some character named Uri who was bashing
"Perl: The Complete Reference", by Martin Brown
in this newsgroup last May.
I guess "Annotated" was Brown's first try, and "Complete" is
the finished product.
If I remember correctly, I was snickering and rolling on the
floor after reading one of the sample chapters.
: so my gut feeling is that is is worth buying for its fuel content or
: chair stabilization ability.
Go with your gut Uri.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 29 Jul 1999 23:13:31 GMT
From: "pjd" <duraipPLEASE_REMOVE_THIS@extendsys.com>
Subject: Re: Calling C from Perl
Message-Id: <7nqn6r$ocs$0@198.102.102.248>
Check out SWIG at http://www.swig.org/
It will not be a quick and dirty solution, it takes quite a bit of learning.
But it is one of the cleanest/easiest ways to do what you want.
If you are lucky, (if your C prototypes are simple) you can do it
practically with no coding.
Hope that helps.
pj
S. Rao MEKA wrote in message <37A0BE38.52ECF2BD@nsf.gov>...
>Hi,
>I need to call C function(s) from Perl.
>Can you folks please tell me, what is the way to call C from Perl. Do I
>need to hack some assembly code OR any quicker way to handle this task.
>Our environment is Solaris.
>
>Thanks
>M
>
------------------------------
Date: Thu, 29 Jul 1999 16:55:57 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Calling C from Perl
Message-Id: <37A0EA0D.F2CBAE0E@mail.cor.epa.gov>
S. Rao MEKA wrote:
>
> Hi,
> I need to call C function(s) from Perl.
> Can you folks please tell me, what is the way to call C from Perl. Do I
> need to hack some assembly code OR any quicker way to handle this task.
> Our environment is Solaris.
Well, Slowlaris shouldn't cause any unusual problem here. You've
already been referred to SWIG. You might also take a look at
the following manpages which should be on your system with your
Perl install:
[ cut from 'man perl': ]
perlxs Perl XS application programming interface
perlxstut Perl XS tutorial
perlguts Perl internal functions for those doing extensions
And you can check on "Advanced Perl Programming" as well.
You may find the chapters on this enlightening.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 29 Jul 1999 17:02:31 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Comparing Scalars
Message-Id: <37A0EB97.F86836FB@mail.cor.epa.gov>
Tom Christiansen wrote:
[a nice set of examples which I heartlessly elided]
> I'll bet you didn't expect this posting. :-)
She was probably expecting the Spanish Inquisition. :-)
David, aka Cardinal Biggles
"Bring out the Comfy::Chair module!"
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 30 Jul 1999 10:29:40 +1000
From: "Ron Savage" <ron_savage@non-hp-australia-om5.om.hp.com>
Subject: Re: Creating dynamic GIF-s from CGI-script
Message-Id: <7nqs2p$mm7$1@ocean.cup.hp.com>
brian exaggerates. Its 430 lines, not thousands. However, he's right in
urging you to use a module. That way the code is reusable more easily. And
anywhere on your web site you can install a script, you can install a module
(hint, hint).
I'll put gifLib.pl & a couple of samples on my web site over the weekend.
_Your_ task, should you choose to accept it (and you'd better :-) since
that's the spirit of the net), is to convert gifLib.pl into a real, live
module on CPAN for all to use...
--
Cheers
Bus: rons@hpaco.aus.hp.com
Home: ron@savage.net.au
http://savage.net.au/
brian d foy <brian@pm.org> wrote in message
news:brian-ya02408000R2807991002440001@news.panix.com...
> In article <7nn0m4$bip$1@news1.relarn.ru>, "Pip" <pip@extech.msk.su>
posted:
>
> > Is there any templates/simple examples how to creat GIF images
> > from (for example) CGI-script WITHOUT any modules?
> > I agree make it "pixel by pixel" :) Main goal: NO MODULES needed.
>
> creating a GIF is not a simple thing. you could do it with no modules,
> but your code is likely to be thousands of lines long.
>
> just use a module.
>
> --
> brian d foy
> CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
> Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 29 Jul 1999 16:40:19 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: File maintenance algorithm required
Message-Id: <37A0E663.D5E32E46@mail.cor.epa.gov>
Roger Musson wrote:
[snip]
> Appending is really what I would like to do for efficiency, but 90% of
> the time the file is used for displaying the recent additions, so
> appending to the front makes the display transaction faster. An index
> would be fine but for the fact that lines can also be deleted from the
> file.
>
> I'm sure there must be a good reason why Perl does not have a
> <lineInput> command that works in reverse, i.e starting at the end of
> the file. This would make things real easy and fast.
Perl *does* have similar features. You may want to go to the FAQ
and look for the question:
"How do I do a tail -f in perl?"
It will not only tell you about seek() and tell() [and how to
use them to do this], but will point you towards the Perl
module File::Tail . The module is, of course, available at
CPAN. If you don't know where that is, there's a FAQ on its
location as well.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 30 Jul 1999 09:23:00 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: form, binary attachments <again>
Message-Id: <MPG.120b8d60fcfe17d2989ba3@news-server>
Anno Siegel writes ..
>Paolo <prinspaul@NOSPAM!hotmail.com> wrote in comp.lang.perl.misc:
>>I must admit I don't know a damn thing about Perl.
>>Now, please don't send me replies about MIME::Lite and CPAN because like I
>>said I don't know anything about perl.
>>Does anybody have a script like this to share ?
>>Or maybe an example ?
>
>Translation: Solve my problem but don't bother me with pesky
>details.
I saw it more as:
I've had my brain removed - can someone please live my life for me and
let me know when I'm dead
how do people go through life not wanting to know things .. Paolo -
you've got more guts than brains if you'd install something that someone
sent you for free without knowing how it works and then make that script
available via the web
--
jason - remove all hyphens for email reply -
------------------------------
Date: Thu, 29 Jul 1999 19:51:44 -0400
From: brian@pm.org (brian d foy)
Subject: Re: GET, but starting at byte 5000, and just get 2000 byte
Message-Id: <brian-2907991951440001@sri.dialup.access.net>
In article <37A03A0B.F2BED320@0011.com>, Kin Lum <kin@0011.com> wrote:
>a question for LWP: it seems that you can send a "GET"
>request for a file, but say, starting at byte 5000
>and then you want just 2000 bytes.
see the HTTP specification for info on asking for Byte-Range:
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 29 Jul 1999 16:36:12 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help install
Message-Id: <37A0E56C.B5049128@mail.cor.epa.gov>
Igor Lior wrote:
>
> Hello!
> Help me to install Perl Win32 on server Apache 1.3.6 (Win32)
Installing it is easy. Just go to www.activestate.com and
download the file for 386 machines. Then click on it to let
it do the installation itself.
The problem will be getting ActiveState Perl to work well
with Apache. IIRC, this is an ongoing problem that the
ActiveState folks are still working on. Some of the mailing
lists you can find at the above ActiveState website have
discussed this.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 29 Jul 1999 16:43:30 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to copy a file to another name in same directory and more ?
Message-Id: <37A0E722.78CACC68@mail.cor.epa.gov>
Yeong Mo/Director Hana co. wrote:
[snip of very same question he asked before]
Pardon me, but I'm beginning to suspect that you're going to
have to learn more Perl before you'll be able to make progress
toward the work you want done. You may want to start with
this tutorial:
http://www.netcat.co.uk/rob/perl/win32perltut.html
and then progress through "Learning Perl for Win32 Systems"
from O'Reilly. Working through the tutorial and the book
will probably help you more than posting here.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 30 Jul 1999 09:50:31 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: How to determine a date in the past
Message-Id: <MPG.120b93d24dacc90c989ba5@news-server>
Eric The Read writes ..
>Steve Walker <Steve.Walker@ing-barings.com> writes:
>> Does anyone know of a way of determining a date in the past, by counting
>> back a specified number of days? Ideally the date would be returned as
>> an integer, i.e. YYYYMMDD.
>>
>> Are there any Perl libraries which provide such a function?
>
>You probably want Date::Manip. See CPAN for more info.
guaranteed that the author of Date::Manip would disagree .. as would most
people .. you should read the Date::Manip documentation - particularly
the section entitled "SHOULD I USE DATE::MANIP" .. because subtracting a
known number of seconds from the current day falls well and truly in the
90% of the time when Date::Manip should be avoided
--
jason - remove all hyphens for email reply -
------------------------------
Date: Thu, 29 Jul 1999 21:19:57 -0300
From: "Vox" <v0xman@yahoo.com>
Subject: How to read the submit button as a name or value
Message-Id: <Tb6o3.41439$jl.29705745@newscontent-01.sprint.ca>
On my page I have more than one submit button with different names and
values ...
how can do I get perl to read the input below?
<input type=submit name="answer" value="Yes">
<input type=submit name="answer" value="No">
<input type=submit name="cancel" value="Cancel">
I've seen this in other places but don't know how to implement it myself.
To get the users input and configure it I do the code below:
read(STDIN, $input, $ENV{'CONTENT_LENGTH'})
@pairs = split(/&/, $input);
foreach $pair (@pairs) {
local($name, $value) = split(/=/, $pair);
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
But for some reason the submit buttons value is not read in $FORM{'answer'}
or $FORM{'cancel'}
Could someone please help me in accomplishing this task? Thanks
------------------------------
Date: 29 Jul 1999 18:43:00 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to read the submit button as a name or value
Message-Id: <37a0f514@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"Vox" <v0xman@yahoo.com> writes:
:On my page I have more than one submit button with different names and
:values ...
:
:how can do I get perl to read the input below?
:
:<input type=submit name="answer" value="Yes">
:<input type=submit name="answer" value="No">
:<input type=submit name="cancel" value="Cancel">
:
:I've seen this in other places but don't know how to implement it myself.
:
:To get the users input and configure it I do the code below:
:
:read(STDIN, $input, $ENV{'CONTENT_LENGTH'})
:@pairs = split(/&/, $input);
THAT WRONG!
% man CGI
NAME
CGI - Simple Common Gateway Interface Class
SYNOPSIS
# CGI script that creates a fill-out form
# and echoes back its values.
use CGI qw/:standard/;
print header,
start_html('A Simple Example'),
h1('A Simple Example'),
start_form,
"What's your name? ",textfield('name'),p,
"What's the combination?", p,
checkbox_group(-name=>'words',
-values=>['eenie','meenie','minie','moe'],
-defaults=>['eenie','minie']), p,
"What's your favorite color? ",
popup_menu(-name=>'color',
-values=>['red','green','blue','chartreuse']),p,
submit,
end_form,
hr;
if (param()) {
print "Your name is",em(param('name')),p,
"The keywords are: ",em(join(", ",param('words'))),p,
"Your favorite color is ",em(param('color')),
hr;
}
ABSTRACT
This perl library uses perl5 objects to make it easy to create
Web fill-out forms and parse their contents. This package
defines CGI objects, entities that contain the values of the
current query string and other state variables. Using a CGI
object's methods, you can examine keywords and parameters passed
to your script, and create forms whose initial values are taken
from the current query (thereby preserving state information).
The module provides shortcut functions that produce boilerplate
HTML, reducing typing and coding errors. It also provides
functionality for some of the more advanced features of CGI
scripting, including support for file uploads, cookies,
cascading style sheets, server push, and frames.
CGI.pm also provides a simple function-oriented programming
style for those who don't need its object-oriented features.
The current version of CGI.pm is available at
http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
ftp://ftp-genome.wi.mit.edu/pub/software/WWW/
DESCRIPTION
PROGRAMMING STYLE
There are two styles of programming with CGI.pm, an object-
oriented style and a function-oriented style. In the object-
oriented style you create one or more CGI objects and then use
object methods to create the various elements of the page. Each
CGI object starts out with the list of named parameters that
were passed to your CGI script by the server. You can modify the
objects, save them to a file or database and recreate them.
Because each object corresponds to the "state" of the CGI
script, and because each object's parameter list is independent
of the others, this allows you to save the state of the script
and restore it later.
You can read the rest on your own system.
--tom
--
"Unix is simple, but it takes a genius to understand the simplicity."
--Dennis Ritchie
------------------------------
Date: 29 Jul 1999 20:16:15 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How to trim a String
Message-Id: <x76733ouuo.fsf@home.sysarch.com>
>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
TC> [courtesy cc of this posting mailed to cited author]
TC> In comp.lang.perl.misc,
TC> Uri Guttman <uri@sysarch.com> writes:
TC> :>>>>> "FN" == Faisal Nasim <swiftkid@bigfoot.com> writes:
TC> : FN> ( local $_ = shift ) =~ s/^\s+|\s+$//gs;
TC> : $_[0] =~ s/^\s+|\s+$//g;
TC> :and no need for the /s as there is no . in the regex.
TC> But there is a ^ and a $.
them use /m and not /s which only affects . either i am totally off base
or you should know that.
TC> Anyway, do you two realize how slow your approach is?
i would use 2 regexes in any of my code for speed and clarity. i was
just fixing up the posted code.
BTW tom, you are bouncing me again. please fix this once more. i don't
think it is fair that you cc me and i can't mail you just because i use
a cable modem. m1rr may have spammers and newbies but i think you know i
am not either one. you must have speed envy. :-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Thu, 29 Jul 1999 19:53:43 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Information on Search Engines
Message-Id: <brian-2907991953440001@sri.dialup.access.net>
In article <37A05D02.C2AF1DF8@hotmail.com>, Rab <rabinv@hotmail.com> wrote:
>I was wondering if any one has any good links to resources that show how
>search engines work (methodology/techniques), and how to set up a search
>engine on a webserver (unix or NT). Even a good script recommendation
>would be helpful.
Yahoo has some good links on the subject. ironic, isn't it?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 29 Jul 1999 23:38:01 GMT
From: prem_g@technologist.com
Subject: Invoing Perl script on Remote NT machine
Message-Id: <7nqoko$d4n$1@nnrp1.deja.com>
Hello
I have a cgi-script(perl) that 'rsh's to a remote machine and
kicks off another perl script. It works OK if the remote machine
is running unix.
If the remote machine is NT, I get a message saying:
"Illegal character \015 (carriage return) at /../test.pl line 2
(Maybe you didn't strip carriage returns after a network transfer?)
(I can rsh and run a shell script on a remote NT machine though).
Do I need to make some config changes that will take care of this
problem?
I appreciate your input.
Thank U,
Prem
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 29 Jul 1999 19:55:20 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Login script, help please
Message-Id: <brian-2907991955200001@sri.dialup.access.net>
In article <7npkub$q31$1@newsflash.concordia.ca>, "W Gemini"
<wgemini-nospam@hotmail.com> wrote:
>I'm new to perl and I'm writing a login script to control accesses to a set
>of html pages. I was told that I can do this by writing a session file to
>the server side once the user log in and delete the file once time expires.
>Could somebody give me a example on how to do that or tell me where I can
>find one on the web? Thanks.
see Nick Kew's login tutorial referenced in the CGI MetaFAQ.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: 29 Jul 1999 16:57:54 PDT
From: "Warren Bell" <warish@concentric.net>
Subject: Modules for Dummies
Message-Id: <7nqpq2$ata@journal.concentric.net>
I would like to learn how I can use modules in my programs. I am finding it
hard to understand. I have read the perlmod pages and I am still lost.
Any good books on the subject?
I have very limited programing knowledge. I don't want to learn how to write
a module, I just would like to take advantage of them.
Any help will be greatly appreciated.
------------------------------
Date: 29 Jul 99 23:50:22 GMT
From: pijll@phys.uu.nl (Eugene van der Pijll)
Subject: Re: OOP question.
Message-Id: <pijll.933292222@ruunat.phys.uu.nl>
In <7nqm4d$sur$1@towncrier.cc.monash.edu.au> damian@cs.monash.edu.au (Damian Conway) writes:
>pijll@phys.uu.nl (Eugene van der Pijll) writes:
> > Well, the words of the original poster were:
> > I came across an exercise that instructed
> > me to create a class C that inherits from classes A and B in that
> > order. The trick was, if a C object should have a particular value (in
^^^^^^^^^^
> > this case, instance variable "name" has value "blah") the order of
> > inheritance should be reversed.
>Objection, m'lud! It doesn't say "reversed _in class C_"! :-)
Overruled. The object should still be <QUOTE>a C object</QUOTE>.
In your first implementation, a "blah" object *never* is blessed into C.
And your second implementation "loses" because it does not have
<QUOTE>a class C that inherits from classes A and B</QUOTE>.
So I still think that my code is what the original poster asked for,
even though your code is what he wanted.
<snip>
>And what if it calls SUPER::method? Then you're stuck with C's default
>inheritance, unless you do the local @ISA trick in every explicit
>method as well :-(
Ah... Er... Well...
> > In fact, I think your code is worse in this regard: each method that
> > you would normally put in C, you now have to put in both C and AntiC.
>Unless they both inherit it from D :-)
Umm. Yes. Of course.
> > BTW, I do hope you realise that the code I posted did not come from
> > some "real" program, that I have never produced something like it,
> > and that I probably never will...
>
>No one's accusing you, Eugene.
You aren't. But you never know who's listening in...
>You were smart enough to solve the problem that way,
>so you're certainly smart enough *not* solve the problem that way. :-)
Thanks. You know, Perl OOP is more fascinating than I'd imagined...
maybe I'll write a book about it someday :-)
Eugene
--
\
Eugene van der Pijll : pijll@phys.uu.nl
--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--
------------------------------
Date: Thu, 29 Jul 1999 16:31:26 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl doc'ing (think of Jabberwocky)
Message-Id: <37A0E44E.A4D0545A@mail.cor.epa.gov>
ebrouwer@ssd.usa.alcatel.com wrote:
>
> For your amusement (and with apologies to Lewis Carroll) I give you:
> [snip of funny parody]
All I can say is "Calloo! Callay!"
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 30 Jul 1999 09:44:33 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: Refresh problem coming out of Perl script
Message-Id: <MPG.120b926f4624c7b4989ba4@news-server>
Jeff Pitman writes ..
>Anyone had this problem? When the user hits back on the browser it re runs
>the perl script and goes to the same "redirected" page. What I want to do
>is when the user clicks on a link, the perl script takes them to a
>redirected page and then when they hit Back, they go to the originating
>referer page. I've tried <meta http-equiv="refresh.... and also I've tried
>a mixture of JavaScript to force the browser to skip/delete the Perl script
>entry in the history.
this is not a perl question .. your perl code does not know what the
browser did before calling it .. all it knows is that the browser has
called it and so it executes
try one of the comp.infosystems.www.authoring.* groups .. or a browser
group .. read their FAQs first
--
jason - remove all hyphens for email reply -
------------------------------
Date: Fri, 30 Jul 1999 09:10:16 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: running Perl and Linux from a boot-cd?
Message-Id: <MPG.120b8a68778a2036989ba2@news-server>
Thomas Weholt writes ..
>> the part of what you want to do that's actually relevant to this group is
>> trivial .. ie. have perl available on a CD
>
>I meant available like ready to run. You mean perhaps an package ready
>to install.
no .. I meant ready to run .. and this step is trivial .. the install of
perl would just come across from the machine that you're taking your OS
image from .. as long as perl is ready to run there - then it will be
ready to run on the CD version of the OS
this is trivial compared to making a static Linux that will boot on a
number of machines .. Linux is very sensitive to hardware components and
the differences between them - it would be almost impossible to have one
CD that would boot up more than a handful of PCs
>Yes, I know it`s a little off topic.
and this impossibility (the difficult part of your question) is
COMPLETELY off topic .. there's no 'a little' about it
>Most of my friends are running windoze and doesn`t want to install perl
>just to search a database. It would be easier for them, perhaps, to boot
>this cd.
as someone else has suggested .. the better option here would be to burn
a Win32 perl onto a CD .. ready to run .. and then have a small BATch
file that ran the necessary things
Bill has some good advice on machine dependencies in perl that you should
heed
--
jason - remove all hyphens for email reply -
------------------------------
Date: Thu, 29 Jul 1999 16:50:56 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Use of uninitialized value at ...... warning with hash of hash
Message-Id: <37A0E8E0.3DF374B3@mail.cor.epa.gov>
J.H.P wrote:
>
> Hi,
>
> When I assign a value to a hash of a hash, I get the
> above warning.
>
> I use
>
> $hash{first}{second}='xxxx';
>
> I 'my' %hash in the subroutine.
You must be doing something else than what you're showing.
You'll have to show the newsgroup 10-15 lines of code which
illustrate your problem. Because just saying:
#!/usr/bin/perl -w
my %hash;
$hash{first}{second}='xxxx';
print $hash{first}{second};
doesn't produce your warning. It prints this:
xxxx
just like you would want. So you're doing something else
which you're not showing us, and *that* is causing the
problem. You may be reading in text from another source,
and not checking that it is defined. But I can't tell.
My PSI::ESP module is on the fritz again.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 29 Jul 1999 16:30:12 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: using sendmail in .pl
Message-Id: <37A0E404.DB01B68E@mail.cor.epa.gov>
Andrzej Filip wrote:
> [snip]
> open( MAIL, "| /usr/lib/sendmail -oi -t") or die "Can't open sendmail\n";
> # -t - get recipient list from headers
> # -oi - single dot is not end of message
> my BCC='name@domain.com';
This won't even compile. Did you mean $bcc instead of BCC ?
I prefer to use all-upper-case only for filehandles and
dirhandles, myself.
> print MAIL << "THE_END" ;
> Subject: test
> BCC: ${BCC}
You don't need curly brackets around BCC here. Just $bcc
[my notation, not yours] would do.
> [snip of rest]
I don't mean to be a pain [well I guess I do mean to be a pain,
but I don't want to offend you]. But good code is important
when newbies are reading it. They won't know the difference
until someone tells them.
Lord knows I've been corrected enough. ;-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 303
*************************************