[13914] in Perl-Users-Digest
No subject found in mail header
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 17:47:54 1999
Date: Mon, 8 Nov 1999 12:38:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942093489-v9-i1310@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 8 Nov 1999 Volume: 9 Number: 1310
Today's topics:
paramter passing with modules and scripts <nead@neadwerx.com>
Re: paramter passing with modules and scripts (Kragen Sitaker)
Re: paramter passing with modules and scripts <nead@neadwerx.com>
Re: parsing a directory content <gellyfish@gellyfish.com>
Re: password question (Randal L. Schwartz)
Re: password question ardit@my-deja.com
Re: password question (Michael Budash)
Re: password question (Michael Budash)
Re: password question ardit@my-deja.com
Re: password question (Michael Budash)
Re: password question (Bart Lateur)
Re: password question <gellyfish@gellyfish.com>
Re: Perl & Internal Date on Wintel (Eisen Chao)
Re: Perl & Internal Date on Wintel <cassell@mail.cor.epa.gov>
Re: Perl & Internal Date on Wintel (Martien Verbruggen)
Re: Perl & Internal Date on Wintel <gellyfish@gellyfish.com>
Perl 4 Script Site <swensont@lanset.com>
Re: Perl 4 Script Site <gellyfish@gellyfish.com>
Perl and Access developers wanted in the UK <clint@drtech.co.uk>
Re: Perl and commonsense part 2 <dan@tuatha.sidhe.org>
Re: Perl and commonsense part 2 <gellyfish@gellyfish.com>
Re: Perl and commonsense part 2 (David H. Adler)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 06 Nov 1999 11:53:17 -0500
From: "Nickolas E. A. Downey" <nead@neadwerx.com>
Subject: paramter passing with modules and scripts
Message-Id: <38245CFD.8E0A29A@neadwerx.com>
I have a script called search.pl.
I have a module called Search.pm
>> search.pl
#!/usr/bin/perl -w
use strict;
use CGI;
use lib '_path_to_module';
use Search;
$cgi = new CGI;
if( $cgi->param('action') eq 'search' ) {
my( %results_hash ) = &exec_search( $cgi, CONSTANT );
if( exists( $results_hash{'special_boolean'} ) ) {
&print_search_hash( $cgi, %results_hash, CONSTANT );
}
else {
&print_no_results( $cgi, CONSTANT );
}
}
else {
#print the form
}
>> Search.pm
# all the constants and exports and etc., have been snipped for brevity
# subroutine print_search_hash is exported, and can be called
successfully
sub print_search_hash {
my( $cgi, %results_hash, $area ) = @_;
# do some stuff with the results hash
# namely print it out in nice html
}
The problem I am having is that the @_ array is arriving initialized
with 10 parameters. Where as, from what I can see, I have only called
the subrountine with 3. Obviously there is some translation that I am
missing here.
I considered obtaining each item specifically by doing
$cgi = $_[0];
%results_hash = $_[1];
$area = $_[$#$_];
needless to say, I get the CGI object and the area parameters fine, but
the results parameter is just garbled. I would prototype the
subroutine,(and tried ($%$) with both of the above parameter accesses)
but I'm not sure how to talk about a hash in a prototype, The camel book
makes allusions to it with the mykeys example (p119), but I'm not to
steady on references yet.
I would appreciate any help, and I love to learn the correct way to do
something, so please help. I also have the Ram if you want to direct me
there.
Thanks
------------------------------
Date: Sat, 06 Nov 1999 19:44:12 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: paramter passing with modules and scripts
Message-Id: <gy%U3.48725$23.1841881@typ11.nn.bcandid.com>
In article <38245CFD.8E0A29A@neadwerx.com>,
Nickolas E. A. Downey <nead@neadwerx.com> wrote:
>>> search.pl
> &print_search_hash( $cgi, %results_hash, CONSTANT );
>
>sub print_search_hash {
>
> my( $cgi, %results_hash, $area ) = @_;
>
> # do some stuff with the results hash
> # namely print it out in nice html
>
>}
>
>The problem I am having is that the @_ array is arriving initialized
>with 10 parameters. Where as, from what I can see, I have only called
>the subrountine with 3. Obviously there is some translation that I am
>missing here.
When you pass an array or a hash as a parameter, the called routine
gets the contents of the array or hash, not the reference.
Then when you do ($cgi, %results_hash, $area) = foo, %results_hash
sucks up all the arguments after the first one, leaving nothing for
$area.
This would actually work fine if you made %results_hash the last
parameter. You could also pass it by reference:
print_search_hash( $cgi, \%results_hash, CONSTANT );
sub print_search_hash {
my ($cgi, $results_hashref, $area) = @_;
# you can either do my %results_hash = %$results_hashref or you
# can just use it through the ref: $results_hashref->{'key'}
}
>I would prototype the
>subroutine,(and tried ($%$) with both of the above parameter accesses)
>but I'm not sure how to talk about a hash in a prototype, The camel book
>makes allusions to it with the mykeys example (p119), but I'm not to
>steady on references yet.
I'm a little conservative; I didn't use modules until 1997 or so. So
I'm not too sure about this newfangled prototype stuff. I tend to
think it should only be used in unusual cases, like when you want to
define new control structures.
But if you're a little more promiscuous than I, you can use ($\%$) as a
prototype and call it exactly as you were calling it before, but now
you'll get a hashref as if you'd called it with \%results_hash.
>I would appreciate any help, and I love to learn the correct way to do
>something, so please help. I also have the Ram if you want to direct me
>there.
If I were doing it, I'd pass %results_hash by reference, without
prototypes -- or if I didn't understand refs, I'd pass %results_hash as
the last arg.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Sat, 06 Nov 1999 15:24:39 -0500
From: "Nickolas E. A. Downey" <nead@neadwerx.com>
Subject: Re: paramter passing with modules and scripts
Message-Id: <38248E87.AA9F84A9@neadwerx.com>
This is very nice, I see now that references are the way to.
Thank you very much.
> print_search_hash( $cgi, \%results_hash, CONSTANT );
> sub print_search_hash {
> my ($cgi, $results_hashref, $area) = @_;
> # you can either do my %results_hash = %$results_hashref or you
> # can just use it through the ref: $results_hashref->{'key'}
> }
>
------------------------------
Date: 6 Nov 1999 19:43:24 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: parsing a directory content
Message-Id: <8020cs$bhs$1@gellyfish.btinternet.com>
On Mon, 01 Nov 1999 22:50:18 GMT davidh wrote:
> Hi folks.
> I am not a programmer but I need some help to build a function that
> parses the content of a directory.
> I am actually trying to build a cgi index file that would read the
> content of a directory, extract some data such as what is between the
> <title> and <meta> tags, and finally parse a dynamic index.
>
If you wanted to *write* such a program you might look into using
the Perl builtins opendir and readdir to get the files in the directory
and the module HTML::HeadParser to get out the contents of the HTML
head section. You will use print to output all this in the appropriate
manner.
As an example of using these things you might see my (now very old looking
and in need of overhaul big time) program dir2html that can be found at:
<http://www.btinternet.com/~gellyfish/resources/dir2html.html>
This is *not* a CGI program although it could be adapted to be so.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 05 Nov 1999 06:17:03 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: password question
Message-Id: <m1wvrxqazk.fsf@halfdome.holdit.com>
>>>>> "ardit" == ardit <ardit@my-deja.com> writes:
ardit> #!/usr/bin/perl
ardit> use LWP::Simple;
ardit> print "pragma:no-cache\n";
This means nothing, and even if you included the colon after the
space, it'd still mean nothing.
ardit> print "content-type:text/html\n\n";
You'll want a space after that colon.
ardit> $url = 'http://interactive.com';
ardit> $doc = get($url) or do {
ardit> print "Can't get News";
ardit> exit (0);
ardit> };
And what's your problem after this?
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 05 Nov 1999 23:56:14 GMT
From: ardit@my-deja.com
Subject: Re: password question
Message-Id: <7vvqqs$gc7$1@nnrp1.deja.com>
In article <m1wvrxqazk.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> >>>>> "ardit" == ardit <ardit@my-deja.com> writes:
>
> ardit> #!/usr/bin/perl
>
> ardit> use LWP::Simple;
> ardit> print "pragma:no-cache\n";
>
> This means nothing, and even if you included the colon after the
> space, it'd still mean nothing.
>
> ardit> print "content-type:text/html\n\n";
>
> You'll want a space after that colon.
>
> ardit> $url = 'http://interactive.com';
>
> ardit> $doc = get($url) or do {
> ardit> print "Can't get News";
> ardit> exit (0);
> ardit> };
>
> And what's your problem after this?
>
> print "Just another Perl hacker,"
>
>
>
#!/usr/bin/perl
use LWP::Simple;
print "content-type: text/html\n\n";
$url = 'http://linuxtoday.com/lthead.txt';
$doc = get($url) or do {
print "Can't get LinuxToday.";
exit (0) ;
} ;
@one = split/\n/,$doc;
print "<FONT COLOR=blue></FONT>
<a href=\"$one[6]\">$one[5]</a><br>\n";
print "$one[7]<P>\n";
#-------end---------
this script works fine for the Linux headlines, but i want to use the
same script to get news from another site that is password protected,
of course i have the password and the username but i don't know how to
include them in the script..
thank you
ardit
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
777 0095
> <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 05 Nov 1999 16:18:17 -0800
From: mbudash@wcws.com (Michael Budash)
Subject: Re: password question
Message-Id: <mbudash-0511991618170001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>
In article <7vvqqs$gc7$1@nnrp1.deja.com>, ardit@my-deja.com wrote:
[snip]
> >
> #!/usr/bin/perl
>
> use LWP::Simple;
>
> print "content-type: text/html\n\n";
>
> $url = 'http://linuxtoday.com/lthead.txt';
>
> $doc = get($url) or do {
> print "Can't get LinuxToday.";
> exit (0) ;
> } ;
>
[snip]
> #-------end---------
>
> this script works fine for the Linux headlines, but i want to use the
> same script to get news from another site that is password protected,
> of course i have the password and the username but i don't know how to
> include them in the script..
from the lwpcook.pod:
> Documents protected by basic authorization can easily be accessed
> like this:
>
> use LWP::UserAgent;
> $ua = new LWP::UserAgent;
> $req = new HTTP::Request GET => 'http://www.sn.no/secret/';
> $req->authorization_basic('aas', 'mypassword');
> print $ua->request($req)->as_string;
>
> The other alternative is to provide a subclass of I<LWP::UserAgent> that
> overrides the get_basic_credentials() method. Study the I<lwp-request>
> program for an example of this.
you'll probaby want to use the first method...
hth-
--
Michael Budash ~~~~~~~~~~ mbudash@wcws.com
------------------------------
Date: Fri, 05 Nov 1999 16:21:21 -0800
From: mbudash@wcws.com (Michael Budash)
Subject: Re: password question
Message-Id: <mbudash-0511991621210001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>
damn! just realized that in my response to the original post, and in an
attempt to 'set off' the quote from the lwpcook.pod, i made it look like
the original poster had sent it... oh, well... 8^\
--
Michael Budash ~~~~~~~~~~ mbudash@wcws.com
------------------------------
Date: Sun, 07 Nov 1999 07:16:34 GMT
From: ardit@my-deja.com
Subject: Re: password question
Message-Id: <80390h$n7q$1@nnrp1.deja.com>
In article <mbudash-0511991618170001@adsl-216-103-91-
123.dsl.snfc21.pacbell.net>,
mbudash@wcws.com (Michael Budash) wrote:
> In article <7vvqqs$gc7$1@nnrp1.deja.com>, ardit@my-deja.com wrote:
>
> [snip]
> > >
> > #!/usr/bin/perl
> >
> > use LWP::Simple;
> >
> > print "content-type: text/html\n\n";
> >
> > $url = 'http://linuxtoday.com/lthead.txt';
> >
> > $doc = get($url) or do {
> > print "Can't get LinuxToday.";
> > exit (0) ;
> > } ;
> >
> [snip]
> > #-------end---------
> >
> > this script works fine for the Linux headlines, but i want to use
the
> > same script to get news from another site that is password
protected,
> > of course i have the password and the username but i don't know how
to
> > include them in the script..
>
> from the lwpcook.pod:
>
> > Documents protected by basic authorization can easily be accessed
> > like this:
> >
> > use LWP::UserAgent;
> > $ua = new LWP::UserAgent;
> > $req = new HTTP::Request GET => 'http://www.sn.no/secret/';
> > $req->authorization_basic('aas', 'mypassword');
> > print $ua->request($req)->as_string;
> >
> > The other alternative is to provide a subclass of I<LWP::UserAgent>
that
> > overrides the get_basic_credentials() method. Study the I<lwp-
request>
> > program for an example of this.
>
> you'll probaby want to use the first method...
>
> hth-
> --
Thank you Michael
the LWP::UserAgent resolved the password problem
but I can't get rid of the document headers, I'm getting those values
on top of the page, like $content_type etc.
and instead of retrieving only 5 headlines the script is showing now
the whole page..
thanks again
ardit
> Michael Budash ~~~~~~~~~~ mbudash@wcws.com
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 06 Nov 1999 23:38:27 -0800
From: mbudash@wcws.com (Michael Budash)
Subject: Re: password question
Message-Id: <mbudash-0611992338270001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>
In article <80390h$n7q$1@nnrp1.deja.com>, ardit@my-deja.com wrote:
> In article <mbudash-0511991618170001@adsl-216-103-91-
> 123.dsl.snfc21.pacbell.net>,
> mbudash@wcws.com (Michael Budash) wrote:
> > In article <7vvqqs$gc7$1@nnrp1.deja.com>, ardit@my-deja.com wrote:
> >
> > [snip]
> > > >
> > > #!/usr/bin/perl
> > >
> > > use LWP::Simple;
> > >
> > > print "content-type: text/html\n\n";
> > >
> > > $url = 'http://linuxtoday.com/lthead.txt';
> > >
> > > $doc = get($url) or do {
> > > print "Can't get LinuxToday.";
> > > exit (0) ;
> > > } ;
> > >
> > [snip]
> > > #-------end---------
> > >
> > > this script works fine for the Linux headlines, but i want to use
> the
> > > same script to get news from another site that is password
> protected,
> > > of course i have the password and the username but i don't know how
> to
> > > include them in the script..
> >
> > from the lwpcook.pod:
> >
> > > Documents protected by basic authorization can easily be accessed
> > > like this:
> > >
> > > use LWP::UserAgent;
> > > $ua = new LWP::UserAgent;
> > > $req = new HTTP::Request GET => 'http://www.sn.no/secret/';
> > > $req->authorization_basic('aas', 'mypassword');
> > > print $ua->request($req)->as_string;
> > >
> > > The other alternative is to provide a subclass of I<LWP::UserAgent>
> that
> > > overrides the get_basic_credentials() method. Study the I<lwp-
> request>
> > > program for an example of this.
> >
> > you'll probaby want to use the first method...
> >
> > hth-
> > --
>
> Thank you Michael
>
> the LWP::UserAgent resolved the password problem
> but I can't get rid of the document headers, I'm getting those values
> on top of the page, like $content_type etc.
> and instead of retrieving only 5 headlines the script is showing now
> the whole page..
>
> thanks again
> ardit
don't know what to tell you, unless i am told exactly what you're trying
to do, then i see the entire script... but i don't think that would be a
good idea in this ng... you might try me offline, but i hope you're not in
a hurry!...
--
Michael Budash ~~~~~~~~~~ mbudash@wcws.com
------------------------------
Date: Sun, 07 Nov 1999 11:36:47 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: password question
Message-Id: <3829591a.2996433@news.skynet.be>
ardit@my-deja.com wrote:
>the LWP::UserAgent resolved the password problem
>but I can't get rid of the document headers, I'm getting those values
>on top of the page, like $content_type etc.
>and instead of retrieving only 5 headlines the script is showing now
>the whole page..
When you issue a "GET"? Now how come that doesn't surprise me. You're
*asking* it to return the whole page. Try "HEAD" instead.
Or, you can get by using the fact that the headers and the contents are
separated by the first empty line. So you can try things like:
($header = $retrieved) =~ s/\n\n.*/\n/s;
or
($header) = $retrieved =~ /^((.+\n)+)/;
--
Bart.
------------------------------
Date: 7 Nov 1999 10:52:45 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: password question
Message-Id: <803llt$cq4$1@gellyfish.btinternet.com>
On Sun, 07 Nov 1999 07:16:34 GMT ardit@my-deja.com wrote:
> In article <mbudash-0511991618170001@adsl-216-103-91-
> 123.dsl.snfc21.pacbell.net>,
> mbudash@wcws.com (Michael Budash) wrote:
>> In article <7vvqqs$gc7$1@nnrp1.deja.com>, ardit@my-deja.com wrote:
>>
>> >
<snip code>
>> >
>> > this script works fine for the Linux headlines, but i want to use the
>> > same script to get news from another site that is password protected,
>> > of course i have the password and the username but i don't know how to
>> > include them in the script..
>>
>> from the lwpcook.pod:
>>
>> > Documents protected by basic authorization can easily be accessed
>> > like this:
>> >
<snip LWP::UserAgent example>
>>
> the LWP::UserAgent resolved the password problem
> but I can't get rid of the document headers, I'm getting those values
> on top of the page, like $content_type etc.
> and instead of retrieving only 5 headlines the script is showing now
> the whole page..
>
You might want to use 'content' rather than 'as_string' to get at the
document body - 'as_string' is documented in the manpage for HTTP::Response
as being largely of use for debugging purposes:
my $response = $ua->request($req);
if ($response->is_success)
{
print $response->content;
# Of course you may want to process more rather than print
}
else
{
print $reponse->status_line;
}
That you are getting a different response is probably due to the fact that
the page you are now getting is of a different form to the one you
expected - how to deal with that is left as an exercise for the reader.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 05 Nov 1999 16:02:04 GMT
From: echao@interaccess.com (Eisen Chao)
Subject: Re: Perl & Internal Date on Wintel
Message-Id: <s25vrsi6hpc18@corp.supernews.com>
Larry Rosler (lr@hpl.hp.com) wrote:
: In article <s1u78o4t24225@corp.supernews.com> on Tue, 02 Nov 1999
: 17:19:20 GMT, Eisen Chao <echao@interaccess.com> says...
: > I tried using localtime() and got a date of 10-02-1999!
:
: How? Have you read the documentation for localtiome()?
Erm... initially, no. I did however look in:
1) The Activestate HTML documentation
2) Perl Camel book
3) Perl Cookbook
4) The command ' perldoc localtime'
(which is the incorrect syntax)
and all said nothing. I finally saw an example
on how to use perldoc and saw what I was messing
up.
Thanks for the prodding!
------------------------------
Date: Fri, 05 Nov 1999 14:36:34 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl & Internal Date on Wintel
Message-Id: <38235BF2.9BB3B49C@mail.cor.epa.gov>
Eisen Chao wrote:
>
> Larry Rosler (lr@hpl.hp.com) wrote:
> : In article <s1u78o4t24225@corp.supernews.com> on Tue, 02 Nov 1999
> : 17:19:20 GMT, Eisen Chao <echao@interaccess.com> says...
> : > I tried using localtime() and got a date of 10-02-1999!
> :
> : How? Have you read the documentation for localtiome()?
>
> Erm... initially, no. I did however look in:
>
> 1) The Activestate HTML documentation
It's in there. In the perlfunc page.
> 2) Perl Camel book
It's in there too.
> 3) Perl Cookbook
It's in there too. In fact, it's on the second page of the
chapter on Dates and Times. In the big table.
> 4) The command ' perldoc localtime'
> (which is the incorrect syntax)
>
> and all said nothing. I finally saw an example
> on how to use perldoc and saw what I was messing
> up.
Glad you're willing to learn. That's all it takes to
become a Perl programmer.
> Thanks for the prodding!
Always glad to abuse the unwary. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 6 Nov 1999 03:02:09 GMT
From: mgjv@wobbie.heliotrope.home (Martien Verbruggen)
Subject: Re: Perl & Internal Date on Wintel
Message-Id: <slrn8276jn.5vv.mgjv@wobbie.heliotrope.home>
On Fri, 05 Nov 1999 16:02:04 GMT,
Eisen Chao <echao@interaccess.com> wrote:
> Larry Rosler (lr@hpl.hp.com) wrote:
> : In article <s1u78o4t24225@corp.supernews.com> on Tue, 02 Nov 1999
> : 17:19:20 GMT, Eisen Chao <echao@interaccess.com> says...
> : > I tried using localtime() and got a date of 10-02-1999!
> :
> : How? Have you read the documentation for localtiome()?
>
> Erm... initially, no. I did however look in:
>
> 1) The Activestate HTML documentation
Activestate comes with the original documentation, available through
perldoc or just an ascii text viewer. It also has the full documentation
set available as HTML. (as you apparently know. Just indulge me, this is
for the benefit of anyone else reading this)
both contain a full description of localtime
C:\DOS> perldoc -f localtime
C:\DOS> perldoc perlfunc
C:\DOS> perldoc perldoc
C:\WINDOWS> clickety->open(Start->Programs->Activestate documentation)
C:\WINDOWS> clickety->NetscapeOpen(perlfunc-link)
> 2) Perl Camel book
My copy of the Camel says in its index that localtime is described on
page 185. It's there, albeit not as good as the entry in perlfunc.
> 3) Perl Cookbook
My copy of the Perl Cookbook has an index entry for localtime, and the
pages 71-76, and 82 actually give some good examples of localtime.
> 4) The command ' perldoc localtime'
> (which is the incorrect syntax)
Indeed :)
> and all said nothing. I finally saw an example
> on how to use perldoc and saw what I was messing
> up.
I don't understand how you can say that all said nothing. At least two
of the three pieces of documentation you said you consulted contain good
information about localtime, which you really couldn't have missed (or
don't you use the index?)
I'm glad you found out that you were not using perldoc correctly, and
that you now know how to do it, I just wanted to correct the potentially
misleading information in your post about both the Camel and the
Cookbook not having anything on localtime.
Martien
--
Martien Verbruggen |
Interactive Media Division | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 6 Nov 1999 15:43:38 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl & Internal Date on Wintel
Message-Id: <801iba$b1i$1@gellyfish.btinternet.com>
In comp.lang.perl.misc David Cassell <cassell@mail.cor.epa.gov> wrote:
> Eisen Chao wrote:
>>
>> and all said nothing. I finally saw an example
>> on how to use perldoc and saw what I was messing
>> up.
>
> Glad you're willing to learn. That's all it takes to
> become a Perl programmer.
>
I'm fairly sure that aptitude counts for something as well.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 5 Nov 1999 19:25:08 -0800
From: "Timothy Swenson" <swensont@lanset.com>
Subject: Perl 4 Script Site
Message-Id: <3823a02c@monitor.lanset.com>
I'm looking for a good site with Perl 4 stuff. Yes, I know that Perl 4 is 7
years old, but that's OK, the computer I'm using it on is 13 years old.
Anyhow, Only Perl 4 has been ported to the QL, so I'm looking for someplace
with some Perl 4 stuff. Hopefully the is still such a site out there (even
if an older archive).
Thanks,
Tim Swenson
Editor, QL Hacker's Journal
swensont@lanset.com
------------------------------
Date: 6 Nov 1999 11:36:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl 4 Script Site
Message-Id: <8013r9$a42$1@gellyfish.btinternet.com>
On Fri, 5 Nov 1999 19:25:08 -0800 Timothy Swenson wrote:
> I'm looking for a good site with Perl 4 stuff. Yes, I know that Perl 4 is 7
> years old, but that's OK, the computer I'm using it on is 13 years old.
>
> Anyhow, Only Perl 4 has been ported to the QL, so I'm looking for someplace
> with some Perl 4 stuff. Hopefully the is still such a site out there (even
> if an older archive).
>
You mean the Sinclair QL ? woo. Of course there is nothing particularly
special about Perl 4 - you could probably adapt most programs that dont
use modules to work with it - if you look at the perltrap manpage it
has a section on Perl 4 to Perl 5 traps which you could apply in reverse.
Maybe you out to set out to port Perl 5 to the QL
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 6 Nov 1999 12:12:52 -0000
From: "Clinton Gormley" <clint@drtech.co.uk>
Subject: Perl and Access developers wanted in the UK
Message-Id: <8015to$phr$1@taliesin.netcom.net.uk>
Orgasmic Wines (http://www.orgasmicwines.com) is the biggest database of
wines for sale over the net in Europe. We launched about 1 month ago and
now require some extra developers to help expand our systems.
Orgasmic Wines runs under Linux, with Apache, mod_perl and MySQL. The
back-office uses an Access front end to interface with the MySQL database.
We are based in London and Norwich. We are looking for permanent
(preferably) or contract developers in these areas:
Linux and Perl developers
A solid knowledge of Linux, Perl (preferably mod_perl) and HTML are required
to aid further development of the front and to automate business processes
at the back end. Knowledge of Apache and MySQL are a plus.
Access developers
In-depth knowledge of Visual Basic for Access a must. You will be improving
the front end used to administer the MySQL database, and working to iron out
the administration processes in the back end. Knowledge of MySQL a plus.
We are a small, friendly hard-working company - and we plan on making it
big! So if you feel that you would fit in, please e-mail me with details on
mailto://clinton@orgasmicwines.com
Thanks
Clinton Gormley
------------------------------
Date: Fri, 05 Nov 1999 15:38:50 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl and commonsense part 2
Message-Id: <eSCU3.2172$c06.15255@news.rdc1.ct.home.com>
Alan J. Flavell <flavell@a5.ph.gla.ac.uk> wrote:
> On Thu, 4 Nov 1999, Kragen Sitaker wrote:
>> F90 is a totally different language for purposes of this discussion,
> Probably true. But physicists write FORTRAN in any language.
> (a quotable quote that I heard at CERN a few years back, but it's
> still uncannily true. A colleague showed me an allegedly C++ source
> the other day, but although written to C++ syntax, it was still
> very obviously a FORTRAN program at heart!)
Heh. The other day one of my cow-orkers showed me some perl code that
she'd written. I boggled for at least a minute. Some people can write
assembler in any language...
Dan
------------------------------
Date: 6 Nov 1999 15:08:13 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl and commonsense part 2
Message-Id: <801g8t$ars$1@gellyfish.btinternet.com>
On 4 Nov 1999 14:39:42 -0500 David H. Adler wrote:
> On Wed, 03 Nov 1999 14:42:31 GMT, ajmayo@my-deja.com
> <ajmayo@my-deja.com> wrote:
>
>>Further to my previous post. My colleague asked me how you would
>>combine two hashes to create a single hash.
>>
>>Well, this is simple with two arrays. Just use push..
>
> [snip]
>
>>So, let's use commonsense. To do the same with two hashes, you'd do
>>this, right?
>
> 'commonsense' only goes so far.
>
> This use of the term strikes me as being much like thinking that
> because screws and nails are both fastening devices, you should be
> able to use a screwdriver on a nail. Needless to say, this does not
> work. :-/
>
Of course you *can* use a hammer on a screw and it will work except that
you most likely wont be able to take the screw out again.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 7 Nov 1999 01:39:21 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: Perl and commonsense part 2
Message-Id: <slrn829m29.68f.dha@panix7.panix.com>
In article <801g8t$ars$1@gellyfish.btinternet.com>, Jonathan Stowe wrote:
>On 4 Nov 1999 14:39:42 -0500 David H. Adler wrote:
>> 'commonsense' only goes so far.
>>
>> This use of the term strikes me as being much like thinking that
>> because screws and nails are both fastening devices, you should be
>> able to use a screwdriver on a nail. Needless to say, this does not
>> work. :-/
>>
>
>Of course you *can* use a hammer on a screw and it will work except that
>you most likely wont be able to take the screw out again.
That use of a hammer was *precisely* why I made my simile go the other
way. :-)
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Hey, Siegfried! Pick an accent and stick with it!
- Tom Servo, MST3K
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 1310
**************************************