[22438] in Perl-Users-Digest
Perl-Users Digest, Issue: 4659 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 4 03:06:01 2003
Date: Tue, 4 Mar 2003 00:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 4 Mar 2003 Volume: 10 Number: 4659
Today's topics:
Re: [OT] NEWBIE: PerlNET <dthomson@NOSPAMusers.sf.net>
Re: [REPOST] Using a (config) file relative to a module (Jay Tilton)
Announce/RFC: Statistics::LSNoHistory v0.01 (John Pliam)
Can I edit the @INC? (niudou)
Re: Can I edit the @INC? <noreply@gunnar.cc>
Re: Can I edit the @INC? <noreply@gunnar.cc>
Re: Can I edit the @INC? <mgjv@tradingpost.com.au>
Check data type? Number or 'letters'? <FreddoSpaceMonkey@hotmail.com>
Re: Check data type? Number or 'letters'? (Tad McClellan)
Re: DBI - Manage multiple SELECT count(*) <athome@rogers.com>
Re: DBI - Manage multiple SELECT count(*) <goldbb2@earthlink.net>
Re: how do I backup db files via FTP?? <aragorn@freemail.gr.gr>
Re: new Perl feature request: call into shared libs <goldbb2@earthlink.net>
Re: newbie array question <goldbb2@earthlink.net>
Re: NEWBIE: PerlNET <dthomson@NOSPAMusers.sf.net>
Re: NEWBIE: PerlNET <jand@ActiveState.com>
Re: PDF::Create Problem <spp@monaco377.com>
Problem building shared object Perl 5.8.0 on Solaris 8/ (J. Estes)
Self-testing Perl-Unit file? <phlipcpp@yahoo.com>
Re: Stolen! <will@com.yahoo>
Re: Stolen! <REMOVEsdnCAPS@comcast.net>
Re: Text list to html files <usenet@dwall.fastmail.fm>
Re: Text list to html files (Tad McClellan)
Works offline but not online <Johan.Ljunggren@uab.ericsson.se>
Re: XML to HTML <asu1@c-o-r-n-e-l-l.edu>
Re: XML to HTML <mirod@xmltwig.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 04 Mar 2003 09:27:31 +1000
From: Derek Thomson <dthomson@NOSPAMusers.sf.net>
Subject: Re: [OT] NEWBIE: PerlNET
Message-Id: <3e63e4c8$0$9539$afc38c87@news.optusnet.com.au>
Peter Cooper wrote:
> "Derek Thomson" <dthomson@NOSPAMusers.sf.net> wrote:
>
>>When it runs on a reasonable OS, and MS de-patent all the bits of it
>>they have locked up, I'll become interested. Until then, I can only
>>assume it's Microsoft's hateful reaction to their failure to destroy
>>Java. By re-doing Java and locking everyone into their "solution".
>
>
> Ah, so you're one of these folks who believe that everything should open and
> that companies should be forced to open up all of their protocols no matter how
> much they spent developing them. Ah.
That would heavily influence my choice, yes. I'd be an idiot to lock
myself into a company that previously used predatory tactics to keep
customers if I had any kind of choice.
>
> .net is actually Microsoft's solution to a problem they originally created,
Great. When are they going to fix the Windows file system?
>
>
>>Why? I don't use their products at all. I just have silly people telling
>>me I must use their poor software for no good reason.
>
>
> I don't think the original poster did that at all. They simply asked a question
> and you decided to use your answer as a platform to launch into a rant.
I decided to ask some questions regarding .NET. Big deal. Are people so
sensitive these days? Sheesh!
>
> .NET is not a Microsoft only domain, by the way.. the Mono project to develop a
> .NET implementation for Linux is going extremely well -> http://www.go-mono.com/
And they are really going to implement all of .NET? Even if (when) MS
start deliberately making .NET not work with Mono? And then, MS will
just pull the rug out from under them, by enforcing their existing
patents on large chunks of .NET. The people working on Mono are
extremely naive, to say the least.
>
> While you might not like the company that created it, .NET is actually a pretty
> good idea, as in -principle- it should allow code running on a Microsoft server,
> say, to be easily ported to Linux, and vice versa.
Doesn't Java? Doesn't Perl? And remember, this doesn't exist yet. It's
only "in theory". I'll believe it when I see it.
>
> Languages like Perl and Java have allowed this for some time, but .NET isn't a
> language, it's more like the JVM, but it covers a lot more ground and becomes a
> lot more integrated with the system.
In what way exactly? All I know is, the JVM actually supports many
languages, and the CLI supports, say, 3.
> .NET heralds the second generation of
> moving towards a world where the OS doesn't actually matter, but the VM does.
Sounds like hype to me. Right now, you need to run it on Windows. Ugh.
That's not really an option, as my standards are higher than that.
Regards,
Derek.
------------------------------
Date: Tue, 04 Mar 2003 07:10:08 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: [REPOST] Using a (config) file relative to a module location...
Message-Id: <3e64441f.39175950@news.erols.com>
Michele Dondi <bik.mido@tiscalinet.it> wrote:
: I hope not to be harassing this ng by reposting my question, but I
: didn't get any answer and I suspect it somehow went "underseen".
Warnock's dilemma.
: # Original Message
: # ================
:
: If I want to "use" (say, open, write, or both) a file (e.g. a config
: file) in the same dir as a script (or in a directory identified by a
: path relative to that dir), browsing through the docs I found out that
: I can use the FindBin module.
:
: But then I thought that I might just stuff the relevant code in a
: module assuming implicitly that a relative path would have been
: interpreted relative to the module's location. By experimenting I
: discovered that it is not the case.
:
: In the end, reading some other docs, I wrote the following code:
:
: # -*- mode: perl -*-
: package foo;
: use strict;
: use warnings;
: use File::Basename;
: require Exporter;
: our @ISA=qw/Exporter/;
: our @EXPORT_OK=qw/foo/;
:
: sub foo {
: open my($fh), "<", dirname($INC{'foo.pm'}) . "/foo.txt"
: or die "Can't open config file 'foo.txt': $!\n";
: return <$fh>;
: }
:
: 1;
: __END__
:
: Eventually, it works as intended, but are there any issues with it?
: What is the "correct" way to accomplish this task, anyway?
I think it comes up seldom enough that anything that works may be
considered correct. If simplicity is the gauge of correctness, you've
nailed it. Document its workings and run with it.
If you've scanned CPAN and seen nothing else that provides this
facility, consider rolling it up into a module of your own and
submitting it.
: Also, even if use File::Basename to get an OS-independent behaviour
: (at an intermediate stage I just used 's|[^/]+$||'), I still use "/"
: as a directory separator on the open() line (don't know how to do it
: otherwise[*]).
The File::Spec module exists for that purpose--a system-independent
tool for creating filespecs.
: As a side question, not that using a module is a major concern for me,
: but both for what regards FindBin and my issue, aren't these matters
: so important that a built-in facility should be provided by the
: interpreter? (e.g. yet another built-in variable)
%INC is both the facility and the variable. I don't think this is
needed often enough to justify spending another variable in the core,
and it wouldn't buy anything your bag on the side can't already
provide.
------------------------------
Date: Tue, 04 Mar 2003 03:12:26 GMT
From: pliam@cpan.org (John Pliam)
Subject: Announce/RFC: Statistics::LSNoHistory v0.01
Message-Id: <c4d5857d4b8a947afd551b88dd86ef1e@news.teranews.com>
I have just uploaded a simple module for doing 2-dimensional
least-squares regression without the need for retaining the
entire history of data:
http://search.cpan.org/author/PLIAM/Statistics-LSNoHistory-0.01/
While several modules exist on CPAN which perform essentially the
same calculations, each requires all the data points in order to
run. However one can anticipate the need to measure correlations
of large amounts of slowly varying data, where batch processing
is inappropriate.
Below is my rationale for naming this module Statistics::LSNoHistory
as a kind of cousin to Statistics::OLS.
All comments welcome,
John
pliam@cpan.org
----
There is an inevitable trade-off between memory and
roundoff resistance for software which computes
classic/standard least-squares regression.
In one extreme, one must make an initial pass over
the data in order to compute the average, and then
another pass, rescaling and computing squares which
might otherwise have blown-up. With this approach,
one must retain the entire data history, costing
memory.
In the other extreme, one must make intuitive guesses
about the averages, updating preliminary statistics
once for each data point. With this approach, one
saves memory at the cost of increased risk of roundoff
error.
All existing CPAN modules for simple 2-dimensional
least-squares fall in the first extreme, while this
module falls in the second. Both have their uses...
------------------------------
Date: 3 Mar 2003 18:08:15 -0800
From: niudou@hotmail.com (niudou)
Subject: Can I edit the @INC?
Message-Id: <324590c7.0303031808.6fb61ac3@posting.google.com>
OS: Windows XP
Perl installation Directory: D:\perl
Files: D:\perl\bin\test.pl
D:\perl\lib\site\ptl\aaa.pm
In test.pl
use ptl::aaa.pm
Issue: When compiling, error message is "Can't locate ptl/aaa.pm in
@INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) ".
Then adds
use lib "d:\\perl\\lib\\site\\PTL";
at the very beginning of the script, but error message again "Can't
locate ptl/aaa.pm in @INC (@INC contains: d:\perl\lib\site\PTL
D:/Perl/lib D:/Perl/site/lib .) ".
So, anyone knows the reason? and how to deal with it? Can I edit the
@INC to delete those two lines:
D:/Perl/lib
D:/Perl/site/lib
and just store the line what I add?
------------------------------
Date: Tue, 04 Mar 2003 03:23:06 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Can I edit the @INC?
Message-Id: <b412m1$1q46h6$1@ID-184292.news.dfncis.de>
niudou wrote:
> Issue: When compiling, error message is "Can't locate ptl/aaa.pm in
> @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) ".
>
> Then adds
> use lib "d:\\perl\\lib\\site\\PTL";
>
> at the very beginning of the script, but error message again "Can't
> locate ptl/aaa.pm in @INC (@INC contains: d:\perl\lib\site\PTL
> D:/Perl/lib D:/Perl/site/lib .) ".
>
> So, anyone knows the reason?
Yes. Actually, you'd be able to figure it out yourself from that error
message...
> and how to deal with it?
Get rid of the backslashes and watch case.
use lib 'D:/Perl/lib/site/PTL';
> Can I edit the
> @INC to delete those two lines:
> D:/Perl/lib
> D:/Perl/site/lib
Yes, but you shouldn't. At it wouldn't solve your problem.
/ Gunnar
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Tue, 04 Mar 2003 03:32:46 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Can I edit the @INC?
Message-Id: <b41386$1rdtke$1@ID-184292.news.dfncis.de>
Gunnar Hjalmarsson wrote:
> Get rid of the backslashes and watch case.
>
> use lib 'D:/Perl/lib/site/PTL';
Correction and addition.
use ptl::aaa.pm;
is not correct. Possibly
use ptl::aaa;
is. But if that's the case, the addition to @INC should just be:
use lib 'D:/Perl/lib/site';
Again: Watch case.
http://www.perldoc.com/perl5.6/pod/perlmod.html
/ Gunnar
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Tue, 04 Mar 2003 02:50:59 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Can I edit the @INC?
Message-Id: <slrnb6854j.1ir.mgjv@verbruggen.comdyn.com.au>
On 3 Mar 2003 18:08:15 -0800,
niudou <niudou@hotmail.com> wrote:
> OS: Windows XP
> Perl installation Directory: D:\perl
> Files: D:\perl\bin\test.pl
> D:\perl\lib\site\ptl\aaa.pm
So.. ptl/aaa.pm is in d:/perl/lib/site ...
> In test.pl
> use ptl::aaa.pm
>
> Issue: When compiling, error message is "Can't locate ptl/aaa.pm in
> @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) ".
>
> Then adds
> use lib "d:\\perl\\lib\\site\\PTL";
So why do you add d:/perl/lib/site/PTL?
use lib "d:/perl/lib/site";
Besides, be careful with case. While your OS's file system does not
care about case, Perl does.
> at the very beginning of the script, but error message again "Can't
> locate ptl/aaa.pm in @INC (@INC contains: d:\perl\lib\site\PTL
> D:/Perl/lib D:/Perl/site/lib .) ".
Indeed. because the module is in d:/perl/lib/site, and that's not in
@INC.
> So, anyone knows the reason? and how to deal with it? Can I edit the
> @INC to delete those two lines:
> D:/Perl/lib
> D:/Perl/site/lib
Why do you want to remove those from @INC? Why do you think that that
would help? You could probably do something like:
BEGIN { @INC = () }
use lib "d:/perl/lib/site";
but I'll predict that many other things will stop working. You do
_not_ want to do this, even if you think you do. Anything included
with "use lib" will be prepended to the @INC list, and will therefore
be searched before the default paths.
Martien
--
|
Martien Verbruggen | I used to have a Heisenbergmobile. Every time
Trading Post Australia | I looked at the speedometer, I got lost.
|
------------------------------
Date: Tue, 4 Mar 2003 02:04:20 -0000
From: "Freddo" <FreddoSpaceMonkey@hotmail.com>
Subject: Check data type? Number or 'letters'?
Message-Id: <b411fs$dp4$1@wisteria.csv.warwick.ac.uk>
Hello,
I have really tried to find the answer to my problem but I am very stuck. I
have searched the web and have googeld to no avail.
I split data into different fields. Now I need to check what "data type"
these fields are to avoid future errors and signal bad data. But, in perl,
variables are not declared as differing types and I am confused as to how to
check this.
Consider that I have the following variables:
$number = 78.55;
$string = "Dave Jones"
How can I do:
if ( is_number($number) == 1) {
print "$number is a number"
}
else
{
print "Error\n";
}
if ( is_string($string) == 1) {
print "$string is a string"
}
else
{
print "Error\n";
}
?
Is the solution going to be simple? I'm guessing not as otherwise I would
have found it.
For any help you give, I am greatful.
Thankyou,
Stevie
------------------------------
Date: Mon, 3 Mar 2003 21:40:08 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Check data type? Number or 'letters'?
Message-Id: <slrnb6880o.5n1.tadmc@magna.augustmail.com>
Freddo <FreddoSpaceMonkey@hotmail.com> wrote:
> I have really tried to find the answer to my problem but I am very stuck. I
> have searched the web and have googeld to no avail.
Did you try searching the files that are already on your hard disk?
> I split data into different fields. Now I need to check what "data type"
> these fields are to avoid future errors
What kind of errors do you mean?
You seldom need to concern yourself with the difference in Perl.
Is this data destined for something else where the distinction
does matter?
> and signal bad data. But, in perl,
> variables are not declared as differing types and I am confused as to how to
> check this.
I am confused as to why you feel you need to check this. :-)
> Consider that I have the following variables:
>
> $number = 78.55;
>
> How can I do:
>
> if ( is_number($number) == 1) {
perldoc -q number
"How do I determine whether a scalar is a number/whole/integer/float?
There are many many different types of numbers, I'll guess you
mean something that could be interpreted as a Real number:
----------------------------
#!/usr/bin/perl
use strict;
use warnings;
my $number = '78.55';
if ( is_number($number) ) {
print "$number is a number\n"
}
else {
print "Error (number)\n";
}
sub is_number {
my($n) = @_;
$n =~ /^-?\d+\.?\d*$/;
}
----------------------------
> if ( is_string($string) == 1) {
Won't this do it?
if ( ! is_number($string) ) {
> Is the solution going to be simple? I'm guessing not as otherwise I would
> have found it.
I think you've guessed wrong. :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 04 Mar 2003 04:16:13 GMT
From: "dave" <athome@rogers.com>
Subject: Re: DBI - Manage multiple SELECT count(*)
Message-Id: <hMV8a.42778$em1.38420@news04.bloor.is.net.cable.rogers.com>
"Tore Aursand" <tore@aursand.no> wrote in message
news:pan.2003.03.03.22.16.09.367267@aursand.no...
> On Mon, 03 Mar 2003 11:47:43 -0800, Hunter wrote:
> > print "2. Have you ever posted a request?";
> > my $sth;
> > my $query = "select count(*) from mysurvey where posted = 'Y'";
> > $sth = $dbh->prepare($query);
> > $sth->execute();
> > while (@row = $sth->fetchrow_array) {
> > ($one) = @row;
> > print "$one people answered <b>YES</b> out of $total total
> > respondants";
> > }
> >
> > print "3. Are you aware we offer 24x7 service?";
> > my $sth;
> > my $query = "select count(*) from mysurvey where preference = 'Y'";
> > $sth = $dbh->prepare($query);
> > $sth->execute();
> > while (@row = $sth->fetchrow_array) {
> > ($one) = @row;
> > print "$one people answered <b>YES</b> out of $total total
> > respondants";
> > }
>
> You don't have the questions stored in the database somewhere? If so,
> there would have been an easy task.
>
> However; let's say you don't. I would, first of all, have gathered the
> question and the question's "keyword" in an array of hashes;
>
> my @questions = (
> {
> 'question' => '2. Have you ever posted a request?',
> 'keyword' => 'posted',
> },
> {
> 'question' => '3. Are you aware we offer 24x7 service?',
> 'keyword' => 'preference',
> },
> );
>
> Then I would have process each element in that array;
>
> my $sth = $dbh->prepare('SELECT COUNT(*) FROM mysurvey WHERE ? = ?');
> foreach ( @questions ) {
> $sth->execute( $_->{'keyword'}, 'Y' );
> my ( $yes ) = $sth->fetchrow();
> print $_->{'question'} . "\n" . $yes . ' answered Yes' . "\n\n";
> }
> $sth->finish();
>
> Or something like that, anyway.
Thanks for the help Tore. The questions are not in the database
unfortunately. I understand you logic - the only problem I have with this
is that not *all* questions are boolean - only about half. The rest are
single digit integers (1 to 10) and there a few text answers as well. I'll
try to implement this hash tomorrow - thanks for the help,
dave
------------------------------
Date: Tue, 04 Mar 2003 00:41:32 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: DBI - Manage multiple SELECT count(*)
Message-Id: <3E643C8C.2CE9CEEA@earthlink.net>
dave wrote:
> Tore Aursand wrote:
[snip]
> > However; let's say you don't. I would, first of all, have gathered
> > the question and the question's "keyword" in an array of hashes;
> >
> > my @questions = (
> > {
> > 'question' => '2. Have you ever posted a request?',
> > 'keyword' => 'posted',
> > },
> > {
> > 'question' => '3. Are you aware we offer 24x7 service?',
> > 'keyword' => 'preference',
> > },
> > );
> >
> > Then I would have process each element in that array;
> >
> > my $sth = $dbh->prepare(
> > 'SELECT COUNT(*) FROM mysurvey WHERE ? = ?');
> > foreach ( @questions ) {
> > $sth->execute( $_->{'keyword'}, 'Y' );
> > my ( $yes ) = $sth->fetchrow();
> > print $_->{'question'} . "\n" .
> > $yes . ' answered Yes' . "\n\n";
> > }
> > $sth->finish();
> >
> > Or something like that, anyway.
>
> Thanks for the help Tore. The questions are not in the database
> unfortunately. I understand you logic - the only problem I have with
> this is that not *all* questions are boolean - only about half. The
> rest are single digit integers (1 to 10) and there a few text answers
> as well. I'll try to implement this hash tomorrow - thanks for the
> help,
For SQL, it shouldn't significantly matter whether the data you are
comparing is boolean, integral, or text ... in all cases, the ==
operator should be fine. All you need to change is your message.
my @questions = (
[ "Have you ever posted a request",
"posted", "Y", "Yes" ],
[ "Are you aware we offer 24x7 service?",
"preference", "Y", "Yes" ],
[ "How many slithy toves have you snicker-snacked?",
"portmanteau", 12, "Twelve" ],
);
my $sth = $dbh->prepare('SELECT COUNT(*) FROM mysurvey WHERE ? = ?');
my $i = 0;
foreach ( @questions ) {
my ($ques, $field, $sql_ans, $output_ans) = @$_;
$sth->execute( $field, $sql_ans );
my ( $yes ) = $sth->fetchrow();
print ++$i, ". $ques\n\n";
print "$yes out of $total answered $output_ans\n";
}
$sth->finish();
--
$;=qq qJ,krleahciPhueerarsintoitq;sub __{0 &&
my$__;s ee substr$;,$,&&++$__%$,--,1,qq;;;ee;
$__>2&&&__}$,=22+$;=~y yiy y;__ while$;;print
------------------------------
Date: Tue, 4 Mar 2003 09:20:28 +0200
From: "aragorn" <aragorn@freemail.gr.gr>
Subject: Re: how do I backup db files via FTP??
Message-Id: <b41k3t$aai$1@nic.grnet.gr>
I am not trying to create a perl script doing the FTP. I just use an
FTP client (WS-FTP to be excact). The problem is not the code. Do you
have any idea why the file should not download correctly (actually it
might download correctly and not upload correctly).
Hope I helped.
"aragorn" <aragorn@freemail.gr.gr> wrote in message
news:b40ccg$m8r$1@nic.grnet.gr...
> I created a database using the dbm structure. My databases work fine
> until I want to download them using FTP. The files is downloaded
fine
> and then I try to upload the same file into the same location. For a
> strange reason this file does not work. I have check that it is bin
> mode I am using both for downloading and uploading but the problem
> remains. I want to backup my db files and be able to restore them
> should anything odd happens to the server.
>
> Does anybody know how to do that?
> Thanks a lot.
>
------------------------------
Date: Mon, 03 Mar 2003 19:46:42 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: new Perl feature request: call into shared libs
Message-Id: <3E63F772.3A1627F1@earthlink.net>
Guenter wrote:
>
> Hi all,
> although I dont like VBScript, what I really like from it is the
> possibility to directly call into shared libs. This works not only on
> Win32 but also on NetWare platform.
> I really wish we could have a similar way of calling shared libs from
> Perl, that would often simplify things and eliminate writing wrappers
> in C, and that would be fine on every platform...
use Win32::API;
If you want it to work with NetWare, you'll have to write it yourself.
You could use the perlbug program and submit a request, with a severity
level of 'wishlist' and maybe, if you're really lucky, someone will
write it for you... but I doubt that'll happen.
If you really and truly need this for NetWare, (and it needs to be done
"now") and don't have the knowledge needed to do it yourself, hire a
programmer to do it for you.
--
$;=qq qJ,krleahciPhueerarsintoitq;sub __{0 &&
my$__;s ee substr$;,$,&&++$__%$,--,1,qq;;;ee;
$__>2&&&__}$,=22+$;=~y yiy y;__ while$;;print
------------------------------
Date: Mon, 03 Mar 2003 19:51:21 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: newbie array question
Message-Id: <3E63F889.EFA6ED60@earthlink.net>
Pirabhu Raman wrote:
[snip]
> Is it possible to send a 8 byte integer using pack function
> (long long) ?
"perldoc -f pack" indicates yes -- but it only works only if you've
Configured and then compiled your perl with -Duse64bitint or with
-Duse64bitall
(You probably will need/want to have the 'use integer' pragma in scope
wherever you're manipulating these 8 byte integers, or else they'll
devolve into doubles (which generally only have 53 bits of precision).
--
$;=qq qJ,krleahciPhueerarsintoitq;sub __{0 &&
my$__;s ee substr$;,$,&&++$__%$,--,1,qq;;;ee;
$__>2&&&__}$,=22+$;=~y yiy y;__ while$;;print
------------------------------
Date: Tue, 04 Mar 2003 11:00:38 +1000
From: Derek Thomson <dthomson@NOSPAMusers.sf.net>
Subject: Re: NEWBIE: PerlNET
Message-Id: <3e63fa9b$0$9535$afc38c87@news.optusnet.com.au>
Jay Tilton wrote:
> It stitches Perl into the .NET framework. Advocacy issues have no
> relevance to the OP's technical difficulty.
>
Ah, so it's not actually running on the CLI, so the claim of being able
to run multiple languages on the CLI is still MIA. As I thought.
Thanks,
Derek.
------------------------------
Date: Mon, 03 Mar 2003 20:43:12 -0800
From: Jan Dubois <jand@ActiveState.com>
Subject: Re: NEWBIE: PerlNET
Message-Id: <2gb86vsrqdud17g0sa0pj5v1tt24nrguu6@4ax.com>
"Jason Hood" <jasonhood@tiscali.co.uk> wrote:
>> > Im looking into PerlNET as a solution.
>> >
>> > I've installed activestate perl, the PDK and visual perl.
>> > When i use this command.
>> >
>> > use namespace "System";
>> >
>> > it tells me that namespace.pm cannot be found.
You need to "compile" your PerlNET program using plc.exe, not run it with
the normal perl.exe. The "namespace" pragma is created by plc.exe on the
fly and doesn't really exist in the file system.
For questions about PerlNET I would recommend to visit the perl.net
mailing list, even though it has been a little quiet recently:
http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/perl.net
Cheers,
-Jan
------------------------------
Date: Tue, 04 Mar 2003 08:49:46 +0100
From: =?ISO-8859-15?Q?S=E9bastien?= Cottalorda <spp@monaco377.com>
Subject: Re: PDF::Create Problem
Message-Id: <3e645d56$0$281$626a54ce@news.free.fr>
Bart Lateur wrote:
> Sébastien Cottalorda wrote:
>
>>I encoutered problem using PDF::Create Module on win32 Platform:
>> Win2000 Server with ActivePerl 5.6.1
HI all,
!!!!! SOLVED PROBLEM !!!!!
>>
>>I manage without any problem to create PDF files and:
>> - With Acrobat Reader, read and print them.
>> - With Ghostscript 7.34 or Ghostscript 8.00 => NO WAY
>>
>>I always get :
>>"Error: syntaxerror in readxref ... Unrecoverable error exit code 1".
>>
>>No problems with the same module but using Linux version.
>
>>If someone has a clue ?
>
> I have a clue, though I'm not familiar with this module. My idea is that
> the handle to which the file must be saved, should have been binmode()d,
> but hasn't been. Therefore, you'd get corrupt line endings. Are you sure
> Acrobat Reader doesn't complain a bit like "this file is corrupt, trying
> to repair it..."?
>
> As I said, I'm not familiar with this module. I don't know if you can
> enforce binmode on the output handle. Perhaps it's just a bug in this
> module.
>
> I just looked at the source, there's no "binmode" in it. Under the line
>
> my $fh = new FileHandle "> $self->{'filename'}";
>
> add
>
> binmode $fh;
>
That's exactly what we have to do to make this module work on Win32
Platform.
Thanks Bart!
Sébastien
------------------------------
Date: 3 Mar 2003 19:35:23 -0800
From: joele54@yahoo.com (J. Estes)
Subject: Problem building shared object Perl 5.8.0 on Solaris 8/Sparc
Message-Id: <a5cf922b.0303031935.52370ba5@posting.google.com>
I have attempted to build Perl 5.8.0 on Solaris 8/Sparc with the
libperl.so (for use with PostgreSQL Perl interface), and it fails
with unresolved symbol boot_vnc. The only reference I find to it
is in perlmain.c, and no other files in the Perl distribution.
I have also had problems with the mv-if-diff and make_ext scripts.
I am using a precompiled gcc v3.1 binary with Solaris's version of ld.
I am not using the built-in malloc in Perl.
Any pointers on how to get around this problem would be appreciated.
TIA
Regardz(tm),
J. Estes
------------------------------
Date: 04 Mar 2003 04:00:16 GMT
From: Phlip <phlipcpp@yahoo.com>
Subject: Self-testing Perl-Unit file?
Message-Id: <b418cg$amv@dispatch.concentric.net>
[x-posted to perlunit-devel@lists.sourceforge.net]
Perlies:
I want to write a .pl file like this:
sub Subject {
# blah blah blah
}
if (GetOptions('...')) {
Subject (options);
}
else {
$results = Subject(test data);
assert ($results);
}
If you call the file with arguments, it does its thing. But if you call the
file without arguments, it tests itself, using assert() et al from
Test::Unit.
The examples for Test::Unit force one to create a module, create a test
module, and invoke it in TestRunner by name. Because my testee does not
need to be a module, this would add clutter.
How minimal can we get?
--
Phlip
http://flea.sourceforge.net
-- Personally qualified to snub Mensa --
------------------------------
Date: Tue, 04 Mar 2003 03:10:59 GMT
From: w i l l <will@com.yahoo>
Subject: Re: Stolen!
Message-Id: <b8686vohbs1ghg6js7rohkji6ojqpqjqui@4ax.com>
lan, 2 questions.....
1) why use PHP at all if you are familiar with perl?
2) how can I get a PGP key thingie like that? is it free?
-Will
On Mon, 03 Mar 2003 17:23:24 GMT, "Ian.H [dS]"
<ian@WINDOZEdigiserv.net> wrote:
>-----BEGIN xxx SIGNED MESSAGE-----
>Hash: SHA1
>
>In a fit of excitement on Mon, 3 Mar 2003 16:55:19 -0000, "Peter
>Cooper" <newsfeed2@boog.co.uk> managed to scribble:
>
>> > Yikes! So I'm watching (just listening really) to
>> > L&O C.I., Dragnet, whatever with my nose in the Book,
>> > "Programming Perl" by Larry Wall, et al, and I hear
>> > "Perl". So I look up at the screen and there they are!
>> > Pretty girls selling tampons. Eeuuuwwww!
>>
>> Well when those jumped up PHP programmers tell me to shove Pe(a)rl
>> up my ass, at least I know it'll be hygenic from now on.
>>
>> Pete
>>
>
>
>They aint all jumped up =P
>
>Personally, I changed from Perl to PHP for Web development, but
>wouldn't drop Perl for system scripting for anything on the market at
>present.
>
>If it's not ASP... it can't be all bad.. and each to their own =)
>
>
>
>Regards,
>
> Ian
>
>-----BEGIN xxx SIGNATURE-----
>Version: PGP 8.0
>
>iQA/AwUBPmOPi2fqtj251CDhEQJXMQCcD3W2KPhAChJQC9aD5tJisuRnWgwAnA0n
>gSGSZhqxLjo5C6OE3MwhI8OG
>=73Wf
>-----END PGP SIGNATURE-----
------------------------------
Date: Mon, 03 Mar 2003 22:13:03 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Stolen!
Message-Id: <Xns9333EC2173B03sdn.comcast@216.166.71.239>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
w i l l <will@com.yahoo> wrote in
news:b8686vohbs1ghg6js7rohkji6ojqpqjqui@4ax.com:
> 1) why use PHP at all if you are familiar with perl?
I can't really answer this, having never used PHP, but it's my
understanding that PHP makes some quick and dirty tasks quicker and
less dirty. In particular, it's supposed to make database access
sweet.
> 2) how can I get a PGP key thingie like that? is it free?
Oh my goodness yes. :-) See http://gnupg.org/ or
http://www.pgpi.org/
It's not *that* useful on usenet, but it is a neat way of digitally
signing one's posts; that is, making forgery impossible. (well... to
the extent that anyone cares to check the signature fully).
- --
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.5.13
iD8DBQE+ZCesY96i4h5M0egRAllkAJ9nE45EUAvzGjKovNjZ5YGp0+gDjwCfXma3
54OU0TS0WpFO8VEmpFqsM90=
=BSwM
-----END PGP SIGNATURE-----
------------------------------
Date: Mon, 03 Mar 2003 23:15:10 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: Text list to html files
Message-Id: <Xns9333B9ACFBB13dkwwashere@216.168.3.30>
Tad McClellan <tadmc@augustmail.com> wrote on 03 Mar 2003:
> Greg Raven <greg@racquettech.com> wrote:
[top-posted text]
>
> You can pay me back by reading the Posting Guidelines that are
> posted here frequently, and stop with the top-posting and
> full-quoting.
I read the guidelines again just to refresh my memory. Do you think
adding a reference to
http://www.catb.org/~esr/faqs/smart-questions.html would be a good
idea?
--
David K. Wall - usenet@dwall.fastmail.fm
"The population of the internet is several hundred millions,
mostly lusers." -- paraphrased from, uh, somewhere
------------------------------
Date: Mon, 3 Mar 2003 20:00:29 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Text list to html files
Message-Id: <slrnb6825t.5am.tadmc@magna.augustmail.com>
David K. Wall <usenet@dwall.fastmail.fm> wrote:
> I read the guidelines again just to refresh my memory. Do you think
> adding a reference to
> http://www.catb.org/~esr/faqs/smart-questions.html would be a good
> idea?
Yes.
I was not aware of that page, I'll add that link soon.
I hear that Eric guy knows about such things. :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 04 Mar 2003 07:52:46 +0100
From: Johan Ljunggren <Johan.Ljunggren@uab.ericsson.se>
Subject: Works offline but not online
Message-Id: <23Y8a.80$Or2.1121501@uab.ericsson.se>
Hi!
Could someone help me with this?
I have a perl CGI script that uses xalan (XSLT) to convert a XML file to
a HTML file. When running it offline it works fine, but when running it
online it doesn't...!?
$rc = system("$java -cp $class_path org.apache.xalan.xslt.Process -IN
$xml -XSL $xslt -OUT $output");
if ($rc != 0) {
<Failed>
} else {
<Redirect>
}
Regards,
Johan
------------------------------
Date: 3 Mar 2003 23:43:31 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: XML to HTML
Message-Id: <Xns9333BE7CBD6C2asu1cornelledu@132.236.56.8>
LM <ellem52@mail.com> wrote in news:tsg76v80e16ofrbe0g1k2587ckpps1230e@
4ax.com:
> I have a 2.5 MB XML file I'd like to convert to HTML to be viewed in a
> browser. (duh)
a stylesheet would be best, you can also take a look at:
http://www.imatix.com/html/gslgen/
--
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov
------------------------------
Date: Tue, 04 Mar 2003 08:06:35 +0100
From: Michel <mirod@xmltwig.com>
Subject: Re: XML to HTML
Message-Id: <b41j9r$nih$1@news-reader12.wanadoo.fr>
LM wrote:
> I have a 2.5 MB XML file I'd like to convert to HTML to be viewed in a
> browser. (duh)
>
> Several people have suggested Perl as being perfect for this I have
> looked on CPAN and dl'd XML:XSLT.
>
> Are there any other modules I will need to accomplish this task? And
> do I have the right one to begin with?
>
> --
> There's more than one way to do it, but only some of them work
Hi,
Excellent question! You don't have the right one. You should look at
XML::LibXSLT, an interface to Gnome's libxslt or at XML::Sablotron, an
interface to the Sablotron XSL engine. Both are faster and have a better
XSLT support than XML::XSLT.
__
Michel Rodriguez
Perl & XML
http://xmltwig.com
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 4659
***************************************