[16118] in Perl-Users-Digest
Perl-Users Digest, Issue: 3530 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 1 09:05:34 2000
Date: Sat, 1 Jul 2000 06: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)
Message-Id: <962456710-v9-i3530@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 1 Jul 2000 Volume: 9 Number: 3530
Today's topics:
Re: Changing .htpasswd on the fly.. <hans@exonet.net>
Re: DANGEROUS CODE ABOVE (was Re: Perl Help Please!) (Bart Lateur)
Re: Dumb Perl (win32) Q (Malcolm Dew-Jones)
Re: Forced Authentication <number1@shhhh.verticon.com>
Re: formatting output of a process (David Efflandt)
Re: HELP ME PLEASE !!!! <iltzu@sci.invalid>
Re: Help with hashes (Bart Lateur)
How do I pass command line switches in variable to a su <robert@chalmers.com.au>
Re: How do I pass command line switches in variable to (Steve Revilak)
Re: Installing modules onto Tripod (Clinton A. Pierce)
Interchage the role of key and value in a hash <abuse@localhost>
Re: Looking for the comp.lang.perl.misc FAQ <o1technospam@skyenet.nospam.net>
mysql and perl in win32 <cdr39750@par.odn.ne.jp>
Re: Need help with IIS configuration for Perl script su (Bart Lateur)
Re: need help with timelocal (M.J.T. Guy)
Re: newbie REGEX problem (Jason Goodrow)
Number of matches question (R.Roe)
Re: Number of matches question (Clinton A. Pierce)
Printing Problems <Gizzzmo@pandora.be>
Re: Problems installing perl on PC (Bart Lateur)
sql without win32::odbc? operating systems? (Lidonyc)
Re: Still stuck: "converting rel. HTML paths into abs. (Gwyn Judd)
Re: Still stuck: "converting rel. HTML paths into abs. <bcaligari@shipreg.com>
Re: Still stuck: "converting rel. HTML paths into abs. (Bill Feidt)
Re: Teen Volenteers WANTED <iltzu@sci.invalid>
Tk::JPEG Greymaus
Re: Typo in Andrew Johnsons book? or Newbie-itis? (Andrew Johnson)
Re: Vector library <randy@theory.uwinnipeg.ca>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 01 Jul 2000 13:43:44 +0200
From: Hans <hans@exonet.net>
Subject: Re: Changing .htpasswd on the fly..
Message-Id: <2lgrls8hgvndjiugqo02ojepiq6elat7rs@4ax.com>
On Fri, 30 Jun 2000 15:24:20 +0200, "Alan J. Flavell"
<flavell@mail.cern.ch> wrote..
>On Fri, 30 Jun 2000, Mark Cain wrote:
>> $pass = crypt($pass, $pass);
>
>Where did you get this idea from? It publishes the first two
>characters of every password, to anyone who can read the file.
The file '.htpasswd' is placed in a directory not accessable from the
web, is this enough to provide basic security/authentication with the
function 'crypt()'?
The thing I am trying to realize is this: when a user fills in a
webform wich asks for (1) an Alias and (2) an E-mail address (done).
The script (on receiving the form values (done)) then generates a
'random' Password (done), and sends an E-mail containing the Alias and
Password to the user (done).
Next the script should update the '.htaccess' file in the protected
directory (todo) and the '.htpasswd' file (todo), so the new user can
login the protected directory instantly (after receiving his/her
Password by E-mail).
Since I have only limited privileges on the (linux) server I am using
I would like to use only 'basic' perl functions, with no extra modules
or libraries for wich I need to be 'root' to install.
Thanks for the input (everyone..) so far, it has been very helpfull.
CU
Hans.
PS. One other thing; please note that I am a newbie writing Perl..
--
EVA <http://www.exonet.net>
------------------------------
Date: Sat, 01 Jul 2000 10:40:34 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: DANGEROUS CODE ABOVE (was Re: Perl Help Please!)
Message-Id: <395dbe15.408147@news.skynet.be>
Randal L. Schwartz wrote:
>Paul> # Assuming you haven't printed your headers
>Paul> print "Content-Type: text/html\n\n" ;
>
>Paul> open PAGE, $page ;
>
>Paul> while (<PAGE>) {
>Paul> s/\!THE_WORD\!/$word/g ;
>Paul> print ;
>Paul> }
>
>So I just invoke
>
> http://www.your.server.org/yourscript?PAGE=rm+-rf+/+|
>
>and you say bye bye to all your files.
>
>Please, people. Do NOT write code that uses params directly as filenames!
I'm not sure what
open PAGE, "rm -rf /";
is supposed to do. I don't think it will invoke rm. But you can still
modify it do to so, I guess.
Question: how safe is -e? It it safe to pass ANY string to it, or is
there still a snake in the grass?
--
Bart.
------------------------------
Date: 30 Jun 2000 22:04:09 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Dumb Perl (win32) Q
Message-Id: <395d7bc9@news.victoria.tc.ca>
Michael Cook (mikecook@dcranch.com) wrote:
: Hello,
: I put Active Perl on my winnt box to do some extra stuff and am having
: trouble debugging CGI scripts. The output of these scripts is usually a
: rather long html page & when I run this from a 'cmd' prompt, it buzzes by
: very fast & I can't see all of the output. Is there a way to scroll back
: through the output, or use a pager (like 'script.pl | more'), or is there
: another interface I should bee debugging from?
: Thanks a million!!!
: Michael
why not just
C:\> perl your-cgi-script.pl | more
or get a copy of 'less' for dos (it can scroll backwards) and type
C:\> perl your-cgi-script.pl | less
or save into a file
C:\> perl your-cgi-script.pl > temp.html
and then open temp.html using your favourite browser.
------------------------------
Date: Sat, 1 Jul 2000 05:29:00 -0700
From: "Dr. Evil" <number1@shhhh.verticon.com>
Subject: Re: Forced Authentication
Message-Id: <vVi75.945$4k.2704@news2.tor.primus.ca>
> That in itself should tell you that it is not a Perl specific thing and
> should be asked in comp.infosystems.www.authoring.cgi .
>
Ya Whatever..
But sometime Perl CAN be used to talk to web servers too.
Not everyone uses front page.
It's the same in any cgi lang or script regardless ...
www-authenticate:
------------------------------
Date: 1 Jul 2000 04:46:52 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: formatting output of a process
Message-Id: <slrn8lqtt0.5j9.efflandt@efflandt.xnet.com>
On Fri, 30 Jun 2000 11:25:59 -0500, Joe Digilio <jdigil1@uic.edu> wrote:
>
>I'm stumped. Here's the situation:
>I am writing a perl script to automate building a project (running make).
>I need to redirect the output to one file. The problem is, all output from
>the make command must be stored to the file in the following format:
>
>YYYY-MM-DD HH:MM:SS [ERR|OUT]: <output line>
>
>Where the date/time is the time of the line's output.
>One more caveat: it has to be in the same order as it was originally
>output.
>
>I have tried opening pipes, redirecting output, etc to no avail.
What part do you have trouble with, getting the data from the external
program or adding the prefix to each line? It would be easy to dup
STDERR to STDOUT and get it all at once.
To keep track of each separately, I have used a child process with a fifo
to grab STDOUT from a process while at the same time reading STDERR status
of the same process from the parent. When the process was finished I got
the STDOUT data from the child. You could reverse this with STDOUT to
parent and STDERR to child. But you would need to sort them on the
timestamp to assemble them into one file. Initially use time (since the
epoch) as you grab the data and convert to formatted time (strftime) when
saving the sorted data.
Actually I also had an additional child using a fifo to feed data into the
process while piping converted STDERR status to a 'dialog' graph (parent,
2 children and 2 external processes at the same time).
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: 1 Jul 2000 12:22:22 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: HELP ME PLEASE !!!!
Message-Id: <962453743.2631@itz.pp.sci.fi>
In article <hfad2um3.fsf@macforce.sumus.dk>, Jakob Schmidt wrote:
>
>( $mydir ) = $0 =~ m#^(.*)/[^/]+$#;
>
>or something similar. This will get the invocation path (be it relative
>or not) as it is.
Something similar in this case could be:
($mydir) = $0 =~ m!(.*)/!;
Why the ugly regexp?
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.
"The screwdriver *is* the portable method." -- Abigail
------------------------------
Date: Sat, 01 Jul 2000 10:40:37 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help with hashes
Message-Id: <3960bfaf.817833@news.skynet.be>
Tad McClellan wrote:
>Plenty of other folks here who are closer to nirvana.
>
>I'll still be calling her "Mrs. Wall" years from now...
Question: how much of a Perl expert is Mrs. Wall?
--
Bart.
------------------------------
Date: Sat, 1 Jul 2000 16:31:05 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: How do I pass command line switches in variable to a subroutine?
Message-Id: <vcg75.55$X71.4982@nsw.nnrp.telstra.net>
I'm trying to get this little bit of code to only use the "-e" command line
switch, but called from the subroutine call, &getwho()
I can pass it the domain name, no problem, but I'm dashed if I can tell it
to recognise that opt{e} is set to "-e"
The command line would be: $./whois.pl -e mydomain.com
Could some kind soul give me clue please?
Thansk
Robert
...............................
#!/usr/bin/perl
use Getopt::Std ;
use Net::XWhois;
sub getwho (dom) {
getopts('neh:', \%opts);
my $whois = new Net::XWhois Domain => shift,
Server => $opts{h};
if ( $opts{e} ) { my @emails = $whois->contact_emails; $" = ", "; print
"Contacts: @emails\n"; exit }
if ( $opts{n} ) { my @emails = $whois->nameservers; $" = ", "; print
"Nameservers: @emails\n"; exit }
print $whois->response;
}
#call to subroutine...
&getwho('xxx.com');
....................................
------------------------------
Date: Sat, 1 Jul 2000 07:40:29 -0400
From: revilak@umbsky.cc.umb.edu (Steve Revilak)
Subject: Re: How do I pass command line switches in variable to a subroutine?
Message-Id: <1ed2ybz.3ldy1xrlcgciN@svr02-p15.ppp.umb.edu>
Robert Chalmers <robert@chalmers.com.au> wrote:
> I'm trying to get this little bit of code to only use the "-e" command line
> switch, but called from the subroutine call, &getwho()
>
> I can pass it the domain name, no problem, but I'm dashed if I can tell it
> to recognise that opt{e} is set to "-e"
>
> The command line would be: $./whois.pl -e mydomain.com
Robert,
It's a different approach, but I've always had good luck getting flags
by iterating over @ARGV (yeah, I know it's K&R-ish :-). And I know
there are shorter ways of doing this (like grep), but I like the control
of the longer approach.
Here's an example. You could also iterate over the array instead of
using shift() to preserver @ARGV.
#!/usr/local/bin/perl
my $eflag = 0;
my $hflag = 0;
my $fdqn = '';
parseargs();
showargs();
exit(0);
sub parseargs()
{
while(@ARGV) {
my $thisflag = shift(@ARGV);
if ($thisflag eq '-e') {
$eflag = 1;
next;
}
elsif ($thisflag eq '-h') {
$hflag = 1;
next;
}
elsif ($thisflag =~ /^-/) {
warn("Unrecognized option $thisflag. Ignored.\n");
}
else {
$fdqn = $thisflag;
}
}
}
sub showargs()
{
printf("eflag=$eflag hflag=$hflag fdqn=$fdqn\n");
}
------------------------------
Date: Sat, 01 Jul 2000 06:17:30 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Installing modules onto Tripod
Message-Id: <_1g75.15905$fR2.185211@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <ELd75.2772$6y5.2788392@news2.rdc2.tx.home.com>,
"Thomas" <mnysurf@home.comREMOVE> writes:
> I want to use LWP.pm with a cgi script on my website that is hosted by
> tripod.com. Tripod has Perl, but it does not include LWP. I obviously do
> not have access to the actual Perl program, so how can I install LWP.pm?
Try the following FAQ answers:
(section 8) How do I keep my own module/library directory?
you'll want this too from section 8:
How do I add the directory my program lives in to the module/library search path?
Take a browse through "perldoc perlmod" too. Good stuff in there.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Sat, 1 Jul 2000 18:33:51 +0800
From: "multiplexor" <abuse@localhost>
Subject: Interchage the role of key and value in a hash
Message-Id: <8jkgvv$kfr3@imsp212.netvigator.com>
I have a hash:
%entity = ('&' , '&' , '>' , '>');
What is the best way to make a hash like the followings?
%code = ('&' , '&' , '>' , '>');
That is, interchange the role of the keys and values of %entity.
I think of using a foreach loop:
foreach (keys %entity) {
%code($entity($_)) = $_
}
Thanks for any help.
------------------------------
Date: Sat, 1 Jul 2000 01:13:05 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: Looking for the comp.lang.perl.misc FAQ
Message-Id: <4Tf75.1984$JZ4.4436@newsfeed.slurp.net>
"Tad McClellan" <tadmc@metronet.com> wrote in message
news:slrn8lq4qe.74g.tadmc@magna.metronet.com...
> On Fri, 30 Jun 2000 17:10:23 -0500, Jim Kauzlarich
<o1technospam@skyenet.nospam.net> wrote:
> >
> >"Tad McClellan" <tadmc@metronet.com> wrote in message
> >news:slrn8lpft3.696.tadmc@magna.metronet.com...
> >> On Fri, 30 Jun 2000 01:53:22 -0500, Jim Kauzlarich
> ><o1technospam@skyenet.nospam.net> wrote:
> >>
>
> >> >but I still can't find the FAQ for this newsgroup.
> >>
> >> I don't think there is one.
> >
> >Surprizing. In my (admittidly sparce) experience, newsgroups are either
a
> >version of the Wild West, or have HUGE faq's. This is a new one for me!
>
>
> We have a truly huge FAQ for the Perl _language_, but no FAQ
> for the Perl _newsgroup_.
>
>
> >BTW... newbie/off-topic question: What are the Big 8? :)
>
>
> The 8 primary Usenet hierarchies ( comp.*, rec.*, ...)
>
Ah. Once again. Thanks. :)
JMK
------------------------------
Date: Sat, 01 Jul 2000 20:12:53 +0800
From: "Jon K." <cdr39750@par.odn.ne.jp>
Subject: mysql and perl in win32
Message-Id: <395DE045.35F15AA@par.odn.ne.jp>
Hi guys,
I installed the old version of win32 perl distro 5.00402
I am trying to get my scripts to connect to mysql and
upon reading the documents from msql-mysql modules
downloaded from www.mysql.com, I realised that I have
to compile the package to make it to work.
As such, during the installation of the win32 perl, I
specify the path for my VC98 path etc. Now when I
"perl makefile.pl" for the msql-mysql modules, it mentioned
that I need to have at least 0.93 version of DBI. Following
this, I downloaded DBI-1_14_tar.gz from the web and did
the following:
1. perl makefile.pl (this went through fine)
2. nmake (went though ok until somewhere in the end)
Error message:
==========================================================
cp lib/DBD/ADO.pm blib\lib\DBD\ADO.pm
E:\PERL5\BIN\perl -p -e "s/~DRIVER~/Perl/g" <
blib\arch\auto\DBI/Driver.
xst > Perl.xsi
E:\PERL5\BIN\perl -Ie:\perl5\lib -Ie:\perl5\lib
E:\perl5\lib\ExtUtils/xs
ubpp -typemap E:\perl5\lib\ExtUtils\typemap Perl.xs >Perl.tc &&
E:\PERL5\BIN\pe
rl -Ie:\perl5\lib -Ie:\perl5\lib -MExtUtils::Command -e mv Perl.tc
Perl.c
Usage: xsubpp [-v] [-C++] [-except] [-prototypes] [-noversioncheck]
[-nolinenumb
ers] [-s pattern] [-typemap typemap]... file.xs
NMAKE : fatal error U1077: 'E:\PERL5\BIN\perl.exe' : return code '0x2'
Stop.
===========================================================
What's wrong with the compiler?
Please advise.
Alternatively, is there any version of win32 perl that comes along with
DBI and MySQL
support?
Thanks and have a nice day!
Cheers,
Jon.
------------------------------
Date: Sat, 01 Jul 2000 10:40:44 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Need help with IIS configuration for Perl script support
Message-Id: <3962c26b.1517797@news.skynet.be>
Eirik Kjølsrud wrote:
>Where can I get a new version, and more importantly, what version is the
>current ?
<http://www.activestate.com/>. Get either 5.005 or 5.6. Not all modules
are ported to 5.6 yet.
--
Bart.
------------------------------
Date: 1 Jul 2000 11:15:06 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: need help with timelocal
Message-Id: <8jkjrq$96$1@pegasus.csx.cam.ac.uk>
In article <395B94C5.B0B98809@cisco.com>,
John Schmidt <johschmi@cisco.com> wrote:
>Perl script below gives me the following error. What do I need to change
>to fix it? I have tried many syntax varations but mostly the one
>uncommented below.
>
>syntax error in file /users/johschmi/bin/epoch.pl at line 6, next 2
>tokens "timelocal ("
>Execution of /users/johschmi/bin/epoch.pl aborted due to compilation
>errors.
That's a Perl4 error message. Upgrade.
Mike Guy
------------------------------
Date: 1 Jul 2000 05:09:26 -0400
From: goodrow@panix.com (Jason Goodrow)
Subject: Re: newbie REGEX problem
Message-Id: <8jkcg6$s5n$1@panix3.panix.com>
Thanks to all the perl crew. Your discussion of my newbie problem was very educational.
goodrow@panix.com
------------------------------
Date: Sat, 01 Jul 2000 04:29:08 GMT
From: rroe@mail.com (R.Roe)
Subject: Number of matches question
Message-Id: <8F64D444rroemailcom@64.34.205.9>
The following code returns 2 because there are 3 strings containing adam.
How to change the code to get 0 indicating that there is only one adam in the
list? Please and TIA
@list=qw/adam bob adams carol dave adamson carol bob/;
@match=grep {/adam/} @list;print $#match;
------------------------------
Date: Sat, 01 Jul 2000 06:15:11 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Number of matches question
Message-Id: <P%f75.15895$fR2.185211@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <8F64D444rroemailcom@64.34.205.9>,
rroe@mail.com (R.Roe) writes:
> The following code returns 2 because there are 3 strings containing adam.
> How to change the code to get 0 indicating that there is only one adam in the
> list? Please and TIA
Please think about how silly that sounds. THINK MAN.
> @list=qw/adam bob adams carol dave adamson carol bob/;
> @match=grep {/adam/} @list;print $#match;
Try something more idiomatic like this:
@list=qw/adam bob adams carol dave adamson carol bob/;
@match=grep {/^adam$/} @list;
print scalar @match; # This prints 1
You get 1 if there's exactly 1 adam. If there's two, you get 2.
If there's no adams...you get 0. Which is false in Perl.
If you just want to see if there's an "adam":
if (@match) {
print "madam im adam";
}
Much cleaner.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Sat, 01 Jul 2000 12:40:06 GMT
From: "GC" <Gizzzmo@pandora.be>
Subject: Printing Problems
Message-Id: <GEl75.43180$NF5.848854@afrodite.telenet-ops.be>
I've a file that contains some text
now the strangest things are happening, when I would like to print every
line from that file, it stops after printing a number of lines, when I test
what could be the problem and I delete the last 10 lines from the file, then
the script stops printing the lines 10 lines earlier etc....
Has anybody had this problem before ?
Any help would be grateful
------------------------------
Date: Sat, 01 Jul 2000 10:40:40 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Problems installing perl on PC
Message-Id: <3961c07c.1023033@news.skynet.be>
Neil Jones wrote:
>The first time I ran out of space on the hard disk which
>is probably the cause of my current problems.
I think that's the crux of it. A Perl installation consists of LOTS of
relatively small files. If your harddisk uses up a 32k block for each 1K
file, your waste is a lot bigger than the actually needed drive space.
You could try doing a minimal install, possibly even a manual copy of
the files you think you need, from your desktop install to your laptop.
A lot of the modules (under "lib") you'll never use. Don't forget to
check out the "auto" subdirectory, if you copy a module that uses XS
(compiled into a DLL).
You can drop either the POD's or the HTML doc files, but preferably not
both!
Or, simply get a bigger disk.
--
Bart.
------------------------------
Date: 01 Jul 2000 05:34:13 GMT
From: lidonyc@aol.com (Lidonyc)
Subject: sql without win32::odbc? operating systems?
Message-Id: <20000701013413.01804.00000696@ng-cn1.aol.com>
If I want to run sql statements in my perl scripts do I have to use win32::odbc
and if so what server operating systems support it? I want to put sql
statements in my perl scripts and would prefer to be on a unix system. Thanks,
If you post a follow up please forward it to my email lidonyc@aol.com
------------------------------
Date: Sat, 01 Jul 2000 05:25:57 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <slrn8lr071.epm.tjla@thislove.dyndns.org>
I was shocked! How could Randal L. Schwartz <merlyn@stonehenge.com>
say such a terrible thing:
>So let me "just state the facts". It's been on the news.admin-posted
>"dead group" list for roughly 5 years. The closest we have to Usenet
>overseers have said "it doesn't exist".
Are you trying to say there is some kind of cabal running Usenet?
--
Gwyn "TINC" Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
Love is sentimental measles.
------------------------------
Date: Sat, 1 Jul 2000 07:54:35 +0200
From: "Brendon Caligari" <bcaligari@shipreg.com>
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <8jk0fo$eg9$1@news.news-service.com>
"Randal L. Schwartz" <merlyn@stonehenge.com> wrote in message
> Jan> comp.lang.perl doesn't exist anymore. I believe that even the
> Jan> company I work for (large ISP, www.planet.nl) carries
> Jan> comp.lang.perl.
>
> So let me "just state the facts". It's been on the news.admin-posted
> "dead group" list for roughly 5 years. The closest we have to Usenet
> overseers have said "it doesn't exist".
>
sorry, but couldn't resist
This reminds me too much of Arthur Dent's house about to
be pulled down after the blueprints had been at the town council
for quite a while.
I'm new to perl, and usenetbut the server to which i subcribed
carries comp.lang.perl which seems to be more active than
alt.perl and comp.lang.perl.misc put together.
B
------------------------------
Date: Sat, 01 Jul 2000 11:03:59 GMT
From: wfeidt@cpcug.org (Bill Feidt)
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <8F6441732wfeidthiscom@207.126.101.97>
bcaligari@shipreg.com (Brendon Caligari) wrote in <8jk0fo$eg9$1@news.news-
service.com>:
>[...] the server to which i subcribed
>carries comp.lang.perl which seems to be more active than
>alt.perl and comp.lang.perl.misc put together.
Ah Usenet! Ah humanity! (with apologies to Herman Melville).
Bill
wfeidt@cpcug.org
------------------------------
Date: 1 Jul 2000 12:37:52 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Teen Volenteers WANTED
Message-Id: <962454353.3563@itz.pp.sci.fi>
In article <395e6e56.2435868@news.skynet.be>, Bart Lateur wrote:
>The scene description language of raytracers like POV is a language,
>that I'm pretty sure. It is structured like a programming language, even
>though it describes 3D structures, not a program.
You happened to pick a bad example - PoV's scene description language
is a proper, Turing-complete programming language, with loops, I/O and
all that. A search for "PoV quine" gives some interesting hits..
[no Perl content - followups set]
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: 1 Jul 2000 01:45:44 -0500
From: Greymaus
Subject: Tk::JPEG
Message-Id: <395d9398$1@post.newsfeeds.com>
*** post for free via your newsreader at post.newsfeeds.com ***
When I run the following code
#!/usr/bin/perl -w
use Tk::JPEG
I get a warning that there is a problem with XS_VERSION and VERSION
any ideas?
**** Post for FREE via your newsreader at post.newsfeeds.com ****
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Newsfeeds.com - The #1 Usenet Newsgroup Service on The Planet! ***
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
http://www.newsfeeds.com | http://www.newsfeeds.com
|
* Anonymous posting server! | * Totally Uncensored!
* SUPER Servers! | * Over 80,000 Newsgroups!
* BINARIES ONLY Servers! | * 16 seperate Newsgroup Servers!
* SPAM FILTERED Server! | * Instant access!
* ADULT ONLY Server! | * Multiple OC 3's and OC 12's!
* MP3 ONLY Server! | * 99% Article Completion!
* MULTIMEDIA ONLY Server! | * Months of Retention!
* 7 UNCENSORED Newsgroup Servers | * Lightning FAST downloads!
|
http://www.newsfeeds.com | http://www.newsfeeds.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
**** Point your newsreader to post.newsfeeds.com ****
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
------------------------------
Date: Sat, 01 Jul 2000 04:10:42 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Typo in Andrew Johnsons book? or Newbie-itis?
Message-Id: <6be75.2849$k5.52659@news1.rdc1.mb.home.com>
In article <fFc75.23649$_b3.528529@newsread1.prod.itd.earthlink.net>,
Gurujiwan <Gorbeast@SPAMSUX.subduction.org> wrote:
> I've been trying to get a snippet of code to work for me and It just wont.
> Is it a typo in this otherwise fine book?
Alas, there are typos in my book -- however, the typos in the code you
show are your own and not in my book (as Uri already pointed out).
However, your real question actually deals with code you didn't show
us regarding something about using a hash and sending an email. If
you post your question, your real code, the errors, and your
expectations, I'm sure someone will point you in the right direction.
regards,
andrew
--
Andrew L. Johnson http://members.home.net/andrew-johnson/
There ain't nothin' in this world that's worth being a snot over.
-- Larry Wall in <1992Aug19.041614.6963@netlabs.com>
------------------------------
Date: Fri, 30 Jun 2000 23:42:37 -0500
From: "Randy Kobes" <randy@theory.uwinnipeg.ca>
Subject: Re: Vector library
Message-Id: <8jjt0a$sul$1@canopus.cc.umanitoba.ca>
<mnanao@my-deja.com> wrote in
message news:8jjlr4$a2m$1@nnrp1.deja.com...
> Does anyone know of a simple library that allows you to manipulate
> vectors in perl? I need vector addition and subtraction in particular.
Vector addition and subtraction are relatively simple
operations that need a sub of only a few lines:
##############################
use strict;
my @a = (1,2,3,4,5);
my @b = (5,6,7,8,5);
my @c = vec_add(\@a, \@b);
print join ' ', @c;
sub vec_add {
my ($a_ref, $b_ref) = @_;
die "Cannot add two vectors of different size"
if @$a_ref != @$b_ref;
my @sum;
for (my $i=0; $i<@$a_ref; $i++) {
$sum[$i] = $a_ref->[$i] + $b_ref->[$i];
}
return @sum;
}
###############################
Similarly for subtraction. You might
want to look at Math::VecStat and
Math::MatrixReal for other operations
for vectors; see, for example,
http://theoryx5.uwinnipeg.ca/CPAN/data/Math-VecStat/VecStat.html
http://theoryx5.uwinnipeg.ca/CPAN/data/Math-MatrixReal/MatrixReal.html
for descriptions of what's available.
best regards,
randy kobes
------------------------------
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 3530
**************************************