[18848] in Perl-Users-Digest
Perl-Users Digest, Issue: 1016 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 30 03:05:45 2001
Date: Wed, 30 May 2001 00:05:15 -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: <991206315-v10-i1016@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 30 May 2001 Volume: 10 Number: 1016
Today's topics:
Re: Creating a file based on a template with scalar val (Michael)
Re: Creating a file based on a template with scalar val <godzilla@stomp.stomp.tokyo>
Re: good perl practice? <todd@designsouth.net>
Re: good perl practice? <comdog@panix.com>
Re: HASH of ARRAY of HASHES <glodalec@yahoo.com>
Re: HASH of ARRAY of HASHES <glodalec@yahoo.com>
How Can abtain yesterday or nextday <seo@linux.nurine.com>
Re: How can I migirate installed&configured activeperl5 (Eric Bohlman)
How to know when compilation occurs ? <jerome.quelin@insalien.org>
Re: manipulating HUGE amounts of text (Martien Verbruggen)
Re: manipulating HUGE amounts of text <todd@designsouth.net>
Re: Perl Community Stars (?) <comdog@panix.com>
Re: Perl Community Stars (?) (Abigail)
Re: Perl Community Stars (?) (Martien Verbruggen)
Re: Perl Community Stars (?) <godzilla@stomp.stomp.tokyo>
Re: Perl Community Stars (?) <godzilla@stomp.stomp.tokyo>
Perl excercises <cometlinear@yahoo.com>
Perl for Windows ?? <rmuthaia@cisco.com>
Re: printing contents of a file to html <pne-news-20010530@newton.digitalspace.net>
Re: Problem installing CPAN modules & pod2man error <news@quickdirect.com>
Re: re-sizing GIF images on the fly (Martien Verbruggen)
Re: redirect (David Efflandt)
showtables puts wasteful blanks at end of each line <jidanni@kimo.FiXcomTHiS.tw>
Re: Statistics for comp.lang.perl.misc <pne-news-20010530@newton.digitalspace.net>
Re: The FlakeyMind Fatteus Byzerk (Topmind)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 30 May 2001 02:46:58 GMT
From: usenet.spam@gunzel.net (Michael)
Subject: Re: Creating a file based on a template with scalar value
Message-Id: <90B18942BgunzelT333@203.50.2.80>
Godzilla! <godzilla@stomp.stomp.tokyo> wrote in article
<3B13C6D5.C406100D@stomp.stomp.tokyo>:
>In general, use of templates is a poor choice in programming.
>Additionally, using variable formats, your $name variable, in
>a template file is not a good choice. This requires evaluation
>of your text based variables; even less efficiency.
>
>Change your $name format in your template to a format similar to:
>
> ¦name¦
>
> ¦user¦
>
>There is no need for variable interpolation doing this. Watch...
>
>$name = "Kiralynne";
>$user = "Godzilla";
>
>&Format;
>
>sub Format
> {
> local ($/);
> open (TEMPLATE, "template.txt");
> $template = <TEMPLATE>;
> close (TEMPLATE);
> $template =~ s/¦name¦/$name/g; ## g if multiple instances
> $template =~ s/¦user¦/$user/g; ## ditto
> }
Hi,
Thanks heaps for the very helpful pointers. As you've probably noticed, I
am fairly new at PERL.
I did find one small fault in the code above which I was able to fix
easily. Just had to escape the pipe in the search/replace string above,
otherwise I got the name and a line break appearing after every single
letter for the whole message, e.g.
RMICHAEL
eMICHAEL
gMICHAEL
aMICHAEL
rMICHAEL
dMICHAEL
sMICHAEL
Where it should have shown "Regards". Hence became:
$template =~ s/\|name\|/$name/g;
The main reason for using a template file is the ability of easily editing
the template file as required, without mucking up the script accidentally
at any point. As with the temp files, just did it because that's the way I
knew how to do it (: Either way I know I have heaps of room for
improvement.
Once again thanks for your help,
Michael
--
(To email me just remove ".spam" off my email address).
Whip me, Beat me, just don't Windows ME
------------------------------
Date: Tue, 29 May 2001 20:21:04 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Creating a file based on a template with scalar value
Message-Id: <3B146720.DF0CE30@stomp.stomp.tokyo>
Michael wrote:
> Godzilla! wrote:
(snippage)
> >Change your $name format in your template to a format similar to:
> > ¦name¦
> > ¦user¦
> >There is no need for variable interpolation doing this. Watch...
> I did find one small fault in the code above which I was able to fix
> easily. Just had to escape the pipe in the search/replace string above,
> otherwise I got the name and a line break appearing after every single
> letter for the whole message, e.g.
If you will look close, you will notice it is not a pipe symbol.
I never use metacharacters for delimiters.
I shall magnify this symbol for you:
|
|
Press: Shift Control Alternate \ all at once to replicate
this symbol if you are using a Win 32 system.
I am pleased to have been of assistance.
Godzilla!
------------------------------
Date: Wed, 30 May 2001 01:56:30 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: good perl practice?
Message-Id: <irYQ6.84673$I5.20275699@news1.rdc1.tn.home.com>
"Willem" <usenet@willem.byte.nl> wrote in message
news:9f1f5v$phe$1@dinkel.civ.utwente.nl...
> Imagine the following example, is this the preferred way of checking for
> errors within subs?
> If not, how could this be written more smoothly?
>
> db_connect() or die "DB connection failed";
>
> sub db_connect {
> use DBI;
> $dbh = DBI->connect("DBI:mysql:byte:host","user","bla");
> if ($dbh) {
> return 0;
> } else {
> warn "Could not connect to dbase: ".DBI->errstr;
> return 1;
> }
> }
>
You've got your 0 and 1 mixed up. It would die if $dbh is defined.
------------------------------
Date: Tue, 29 May 2001 22:32:51 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: good perl practice?
Message-Id: <comdog-1EE9ED.22325129052001@news.panix.com>
In article <irYQ6.84673$I5.20275699@news1.rdc1.tn.home.com>, "Todd
Smith" <todd@designsouth.net> wrote:
> "Willem" <usenet@willem.byte.nl> wrote in message
> news:9f1f5v$phe$1@dinkel.civ.utwente.nl...
> > Imagine the following example, is this the preferred way of checking for
> > errors within subs?
> > If not, how could this be written more smoothly?
> >
> > db_connect() or die "DB connection failed";
> >
> > sub db_connect {
> > use DBI;
> > $dbh = DBI->connect("DBI:mysql:byte:host","user","bla");
> > if ($dbh) {
> > return 0;
> > } else {
> > warn "Could not connect to dbase: ".DBI->errstr;
> > return 1;
> > }
> > }
> >
>
> You've got your 0 and 1 mixed up. It would die if $dbh is defined.
rather than use magic return values, use symbolic constants. you
can make the flow much more clear by declaring your intentions
and showing which values you expect. you won't mix up 0 and 1
unless you mess up the constant definitions, but even then it
doesn't matter because the actual value of the symbolic constant
doesn't have to mean anything if you only use it by name. ;)
use constant FAILED => 0;
use constant CONNECTED => 1;
unless( db_connect() == FAILED )
{
...do stuff...
}
sub dbconnect
{
...stuff...
return CONNECTED; # or return FAILED;
}
--
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
------------------------------
Date: Wed, 30 May 2001 04:56:20 +0200
From: Marvin <glodalec@yahoo.com>
Subject: Re: HASH of ARRAY of HASHES
Message-Id: <MPG.157e7fc1472801459896ce@news.siol.net>
In article <slrn9h6k63.2s4.bernard.el-hagin@gdndev25.lido-tech>,
bernard.el-hagin@lido-tech.net says...
> On Tue, 29 May 2001 09:12:30 +0200, Marvin <glodalec@yahoo.com> wrote:
> >Hi !
> >
>
> [snip]
>
> >It looks, that $ENV{df} is an array. My question is, how to get number
> >of elements (in this case 3) from that variable. $#ENV{df} won't work,
> >cause $# doesnt work on subscript.
>
> If $hash{df} is a reference to an array you can get the index of the
> last element of that array (not the number of elements, as you put it)
> using:
>
> $#{$hash{df}}
>
> >Also I would like to use foreach..rather than for (...) statement.
>
> Same principle:
>
> foreach (@{$hash{df}}){
> #do some stuff
> }
>
> Cheers,
> Bernard
> --
> perl -le '$#="Just another Perl hacker,"; print print;'
>
Thanks. I didn't know there should be additional {} for hash variable.
{$hash{df}} intead of just $hash{df}.
------------------------------
Date: Wed, 30 May 2001 04:57:20 +0200
From: Marvin <glodalec@yahoo.com>
Subject: Re: HASH of ARRAY of HASHES
Message-Id: <MPG.157e7ffe8ebfda7b9896cf@news.siol.net>
In article <9evn2c$i44$1@mamenchi.zrz.TU-Berlin.DE>, anno4000
@lublin.zrz.tu-berlin.de says...
> According to Marvin <glodalec@yahoo.com>:
>
> [...]
>
> > It looks, that $ENV{df} is an array. My question is, how to get number
> > of elements (in this case 3) from that variable. $#ENV{df} won't work,
> > cause $# doesnt work on subscript. Also I would like to use foreach..
> > rather than for (...) statement.
> >
> > #!/usr/local/bin/perl
> >
> > my %ENV=GetData();
> > print "Time: ",$ENV{time},"\n";
>
> [more code snipped]
>
> Let me first note that the choice of %ENV for your hash is somewhat
> unfortunate: %ENV is a pre-defined hash in Perl (it reflects the
> process environment). While it is possible to have, as you do, a
> lexical variable of the same name, this can only lead to confusion.
I know, I use that name only in a post :)
Thanks anyway.
>
> To your question: $ENV{ df} is, of course, not an array, but a
> reference to an array. The actual array is @{ $ENV{ df}}, and using
> that in scalar context gives you the number of elements, as with
> any Perl array. Similarly, @{ $ENV{ df}} can be used in a foreach
> statement to loop over the elements. To use the $#... construct, the
> procedure is similar: You replace the array name with an array ref
> in {}, which leads to $#{ ENV{ df}}, the index to the last element in
> @{ $ENV{ df}}.
>
> Anno
>
------------------------------
Date: Wed, 30 May 2001 15:27:03 +0900 (KST)
From: seo kyeong chan <seo@linux.nurine.com>
Subject: How Can abtain yesterday or nextday
Message-Id: <9f23rn$lv4$1@news2-2.kornet.net>
Keywords: date,yesterday,tomorrow
How can I obtain Yesterday , Tomorrow or
nowdate + (x)
Thanks!!
------------------------------
Date: 30 May 2001 02:23:05 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: How can I migirate installed&configured activeperl5.6 to another machine
Message-Id: <9f1li9$cnl$1@bob.news.rcn.net>
GArlington <admin@ase-ga.com> wrote:
> Copy perl directory structure...
Depending on your ActiveState version, you may also have to copy some
files (e.g. perlcrt.dll for the 500-series builds) which the installer
puts in /windows/system.
------------------------------
Date: Wed, 30 May 2001 07:50:59 +0200
From: Jerome Quelin <jerome.quelin@insalien.org>
Subject: How to know when compilation occurs ?
Message-Id: <991201859.1747393469@news.libertysurf.fr>
Hi all,
I'm coding a GUI application and to get better response time, i'm
delaying compilation until run-time with require and other SelfLoader.
But I'd like to get into perl's inner more deeply, and know exactly
when those compilations happens (partly for fun, partly for
optimisation, partly to improve my perl knowledge).
So I'm looking for a module or a trick that would print on STDERR (or
wherever or would inform me the way it want) something like "Compiling
module MOD", "Compiling sub MOD::SUB", "Entering sub MOD::SUB",
"Leaving sub MOD::SUB", and other things like that.
For example, with those 3 files:
-- File run.pl
#!/usr/bin/perl
use Mod1;
print "main::1";
sub sub1 { print "main::sub1\n" }
print "main::2";
sub1();
require Mod2;
sub sub2 { print "main::sub2\n" }
print "main::3";
sub2();
sub3();
sub4();
-- End of run.pl
-- File Mod1.pm
package Mod1;
use Exporter;
@ISA=qw(Exporter);
@EXPORT=qw(sub3);
print "Mod1::1\n";
sub sub3 { print "Mod1::sub3\n" }
print "Mod1::2\n";
1;
-- End of Mod1.pm
-- File Mod2.pm
package Mod2;
use Exporter;
@ISA=qw(Exporter);
@EXPORT=qw(sub4);
print "Mod2::1\n"
sub sub4 { print "Mod2::sub4\n" }
$code = 'print "Mod2::2\n"'
eval $code;
print "Mod2::3\n";
1;
-- End of Mod1.pm
When running run.pl, we'll get something like (if I'm understanding
correctly perl's inner engine :) ):
Compiling file main
Compiling file Mod1.pm
Compiling MOD1::sub3 (Mod1.pm:6)
MOD1::1
MOD1::2
End of file Mod1.pm
Compiling main::sub1 (run.pl:4)
Compiling main::sub2 (run.pl:8)
main::1
main::2
Entering main::sub1
main::sub1
Leaving main::sub1
Compiling file Mod2.pm
Compiling Mod2::sub4 (Mod2.pm:6)
Mod2::1
Compiling Mod2::eval (Mod2.pm:8)
Mod2::3
Mod2::2
End of file Mod2.pm
main::3
Entering main::sub1
main::sub1
Leaving main::sub1
Entering main::sub2
main::sub2
Leaving main::sub2
Entering Mod1::sub3
Mod1::sub3
Leaving Mod1::sub3
Entering Mod2::sub4
Mod2::sub4
Leaving Mod2::sub4
Well, you get the point. I want a sort of trace engine, without having
to run it hand by hand, like the perl debugger. And even with the
debugger, I don't know when compilation occurs.
And what about nested evals, require, use, sub, BEGIN and END
functions, SelfLoader and AutoLoader modules, subs that act like
methods on objects, callbacks and so on ?
If you have some tool or trick or module that will match my requisites, let me
know please!
Cheers,
Jerome
--
jerome.quelin@insalien.org
------------------------------
Date: Wed, 30 May 2001 02:42:47 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: manipulating HUGE amounts of text
Message-Id: <slrn9h8nh7.div.mgjv@verbruggen.comdyn.com.au>
On Tue, 29 May 2001 21:50:15 GMT,
Todd Smith <todd@designsouth.net> wrote:
> If I wanted to play with files (tar files maybe) that were gigabytes in
If you want to play with tar files, you probably should get a module
that can read them. Archive::Tar is one such module.
I'd be very cautious in directly updating a tar file, instead of
working on the files in the tar.
> size, and I wanted to look for patterns in the text and rearrange columns
> and rows, what would be the best way to represent the data in my program,
> considering that I (probably) wouldn't want an array with a billion
> elements?
You haven't specified your problem very well.
if you want to rearrange columns in a line that matches certain
criteria, then you read your file line by line, and you swap columns
each time.
If you have to swap columns in all of the lines, depending on some
stuff in the file somewhere else, then find that stuff first, then
work through the file line by line.
If you need to rearrange rows (which I interpret as lines, you could
read the original file line by line, and spit out a rearranged one
separately.
It's hard to guess exactly what you want to do, what the problem space
is, the parameters, the criteria, and what exactly you mean by
'columns' and rows.
Perl is probably not the right language to keep gigabytes of data into
memory, because it will take much more than the raw data.
Martien
--
Martien Verbruggen |
Interactive Media Division | +++ Out of Cheese Error +++ Reinstall
Commercial Dynamics Pty. Ltd. | Universe and Reboot +++
NSW, Australia |
------------------------------
Date: Wed, 30 May 2001 07:04:24 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: manipulating HUGE amounts of text
Message-Id: <YX0R6.86838$I5.20535911@news1.rdc1.tn.home.com>
"Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
news:slrn9h8nh7.div.mgjv@verbruggen.comdyn.com.au...
>
> It's hard to guess exactly what you want to do,
I used tar files as an example, just because they are usually big and
(looking at the actual file in vi) appears to humans to be random
characters. What I want to do is load a file of characters (billions) in
order but no format, and be able to access each character so I can traverse
the line however I want so I can look for patterns.
undef $/;
@chars = split //, <INPUT>;
# $#chars could be in the billions
Doing this isn't my question- I'm wondering what's the best way to store and
represent that many characters in Perl? I was wondering if there was a
better way than trying to use such a large array.
------------------------------
Date: Tue, 29 May 2001 21:07:52 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Perl Community Stars (?)
Message-Id: <comdog-EA9B78.21075229052001@news.panix.com>
In article <9f157l$boq$1@plutonium.btinternet.com>, "Steve Kay"
<sgkay@btinternet.com> wrote:
> "Lou Moran" <lmoran@wtsg.com> wrote in message
> news:gp77htg4qja5irh0eube3359j953ti75qo@4ax.com...
> > --I have noticed that Perl seems to have "famous" people.
famous outside of Perl? well, i only know of one Perl person who
might have a movie made about him. ;)
> > --Are there other famous programmers in other languages or is this a
> > "Perl Thing"?
> Don't think it's just a Perl thing : jahhaj@bigfoot.com could be classified
> as a star of the comp.lang.c++ newsgroup (about 100 postings in the past
> week).
Any subculture will have its "stars".
--
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
------------------------------
Date: Wed, 30 May 2001 01:14:27 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Perl Community Stars (?)
Message-Id: <slrn9h8ibj.s1k.abigail@tsathoggua.rlyeh.net>
brian d foy (comdog@panix.com) wrote on MMDCCCXXIX September MCMXCIII in
<URL:news:comdog-EA9B78.21075229052001@news.panix.com>:
$$
$$ well, i only know of one Perl person who
$$ might have a movie made about him. ;)
It's her.
Several movies have been made about Godzilla.
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
------------------------------
Date: Wed, 30 May 2001 02:32:56 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Perl Community Stars (?)
Message-Id: <slrn9h8muo.div.mgjv@verbruggen.comdyn.com.au>
On Wed, 30 May 2001 01:14:27 +0000 (UTC),
Abigail <abigail@foad.org> wrote:
> brian d foy (comdog@panix.com) wrote on MMDCCCXXIX September MCMXCIII in
><URL:news:comdog-EA9B78.21075229052001@news.panix.com>:
> $$
> $$ well, i only know of one Perl person who
> $$ might have a movie made about him. ;)
>
>
> It's her.
>
> Several movies have been made about Godzilla.
Yes, but I wouldn't really classify her as a Perl person, more as a
cargo-cult misinformant. Or has she improved since my killfile started
taking care of threads containing posts from her?
Martien
--
Martien Verbruggen |
Interactive Media Division | +++ Out of Cheese Error +++ Reinstall
Commercial Dynamics Pty. Ltd. | Universe and Reboot +++
NSW, Australia |
------------------------------
Date: Tue, 29 May 2001 20:35:05 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl Community Stars (?)
Message-Id: <3B146A69.E9633527@stomp.stomp.tokyo>
Abigail wrote:
> brian d boy wrote:
> $$ well, i only know of one Perl person who
> $$ might have a movie made about him. ;)
> It's her.
> Several movies have been made about Godzilla.
Oh No, They Say She's Got To Go Go Go Godzilla!
Yes, there have been many movies produced about me
and zillions of spin-off products. I am a billion
dollar industry, all to my own.
I also enjoy my own popular rock theme song. This
version is recorded here at home featuring my
Little Godzilla and I.
http://la.znet.com/~callgirl3/godzilla.mid
I am so vain, err, popular, I even have my own
unique GO GO GODZILLA browser shown by my headers.
Godzilla!
--
@ø=(a .. z);@Ø=qw(6 14 3 25 8 11 11 0 17 14 2 10 18);
$§="\n";$ß="\b";undef$©;print$§x($Ø[4]/2);
for($¡=0;$¡<=$Ø[2];$¡++){foreach$¶(@Ø){
$ø[$¶]=~tr/A-Z/a-z/;if(($¡==1)||($¡==$Ø[2]))
{$ø[$¶]=~tr/a-z/A-Z/;}print$ø[$¶];if($¶==0)
{print" ";}if($¶==$Ø[12]){print" !";}&D;}
print$ßx($Ø[4]*2);}print$§x($Ø[10]*2);
sub D{select$©,$©,$©,.25;}exit;
------------------------------
Date: Tue, 29 May 2001 20:45:33 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl Community Stars (?)
Message-Id: <3B146CDD.4606F9D4@stomp.stomp.tokyo>
Martien Verbruggen hissed:
> Abigail wrote:
> > brian d boy wrote:
> > $$ well, i only know of one Perl person who
> > $$ might have a movie made about him. ;)
> > It's her.
> > Several movies have been made about Godzilla.
> Yes, but I wouldn't really classify her as a Perl person, more as a
> cargo-cult misinformant. Or has she improved since my killfile started
> taking care of threads containing posts from her?
You will perform a better service for our internet
community if you will refrain from spreading
discontent and hatred.
Godzilla!
------------------------------
Date: Tue, 29 May 2001 21:21:50 -0700
From: dot-comet <cometlinear@yahoo.com>
Subject: Perl excercises
Message-Id: <290520012121506059%cometlinear@yahoo.com>
Hi Peeps,
Can anyone recommend and websites which have Perl "homework
assignments" (excercises) for beginner-intermediate level. I've got to
keep my blade sharp...
Also, does anyone know the best way to use Perl on a Palm pilot? I'd
like to be able to practice scripting while waiting in line, etc.
Thanks a LOT in advance,
-joshua
staff "at" dot - comet . com
------------------------------
Date: Wed, 30 May 2001 12:08:42 +0530
From: Ramanathan <rmuthaia@cisco.com>
Subject: Perl for Windows ??
Message-Id: <3B149572.A1540D1@cisco.com>
Hi,
Can anyone pls. point me to the location(s) to download Perl v5.003_11
for windows nt ?
Thanks
Ram
------------------------------
Date: Wed, 30 May 2001 07:53:38 +0200
From: Philip Newton <pne-news-20010530@newton.digitalspace.net>
Subject: Re: printing contents of a file to html
Message-Id: <fb19htsoc2g4nrchka3t4oldsueqh4es1r@4ax.com>
On Tue, 29 May 2001 08:59:31 GMT, Bart Lateur <bart.lateur@skynet.be>
wrote:
> Philip Newton wrote:
>
> >However, what's wrong with an absolute file path? (Don't you know where
> >you put your files? ;)
>
> I think he's worried about moving the script to different servers.
Then FindBin is probably appropriate. (chdir by itself will only help if
you know the directory to change to, which has to be absolute since you
can't depend on the value of the current directory... chicken and egg
here. But if you use FindBin, you can chdir to $FindBin::Bin or
something relative to that if you want, but you could also just prepend
an appropriate directory to the filename in the open().)
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 30 May 2001 02:36:57 GMT
From: Shadow <news@quickdirect.com>
Subject: Re: Problem installing CPAN modules & pod2man error
Message-Id: <h4n8htgsbd96a8hrqqvmfubsvhg3t1o82u@4ax.com>
OK... I'm installing manually on my virtual host and now I'm coming up
with the following error
Warning: I could not locate your pod2man program. Please make sure,
your pod2man program is in your PATH before you execute 'make'
I'm assuming the below errors were some sort of corruption and/or a
permissions problem on my end being unable to install in the root...
can anyone help me with the pod2man problem?
On Wed, 30 May 2001 00:04:55 GMT, Shadow <news@quickdirect.com> wrote:
>I'm a bit new to perl but I was successful in installing some of the
>modules. Here are the commands I used. I ended up getting the errors
>below on some of the modules. It seems that a bunch of the modules are
>corrupt/bad checksum and I find it hard to believe that there are
>problems with so many of these -- including the Bundle::CPAN which I
>was told could be installed and I also got the same checksum/bogus
>file warning. Does anyone know what all this means and how I can
>install the missing modules?
>
>Thank you in advance...
>
>Mike
>
>Commands I used:
>
>bash% perl -MCPAN -e shell
>cpan> install Net::NNTP
>cpan> install Net::SMTP
>cpan> install DBI
>cpan> install Bundle::MySQL
>cpan> install Text::Autoformat
>cpan> install Date::Parse
>cpan> install Email::Find
>cpan> install URI::Find
>cpan> install MIME::WordDecoder
>
>
>
>Errors I received from some of the modules:
>
>
>cpan> install DBI
>Running make for T/TI/TIMB/DBI-1.15.tar.gz
>Unwrapped into directory yes/build/TIMB000
>
>CPAN.pm: Going to build T/TI/TIMB/DBI-1.15.tar.gz
>
>Couldn't chdir yes/build/TIMB000: No such file or directory at (eval
>26) line 42
>19
>======================================
>
>cpan>install Bundle::MySQL
>Can't install Bundle::MySQL, don't have an associated bundle file. :-(
>at (eval 26) line 1806
>
>
>
>===============================
>
>
>cpan> install Text::Autoformat
>cpan> install Date::Parse
>cpan> install Email::Find
>cpan> install URI::Find
>cpan> install MIME::WordDecoder
>cpan> install HTML::Entities
>
>yields these errors:
>
>
>Running make for D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz
>yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz: No
>such file or
>directory
>Checksum mismatch for distribution file. Please investigate.
>
>Distribution id = D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz
>CALLED_FOR Text::Autoformat
>CONTAINSMODS Text::Autoformat
>CPAN_USERID DCONWAY (Damian Conway <damian@conway.org> )
>MD5_STATUS
>localfile
>yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz
>
>I'd recommend removing
>yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz. It
>seems
>to
>be a bogus file. Maybe you have configured your `urllist' with a
>bad URL. Please check this array with `o conf urllist', and
>retry.
>
>Fetching with LWP:
>ftp://ftp.perl.org/pub/CPAN/authors...ONWAY/CHECKSUMS
>yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz: No
>such file or
>directory
>Checksum mismatch for distribution file. Please investigate.
>
>Distribution id = D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz
>CALLED_FOR Text::Autoformat
>CONTAINSMODS Text::Autoformat
>CPAN_USERID DCONWAY (Damian Conway <damian@conway.org> )
>MD5_STATUS
>localfile
>yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz
>
>I'd recommend removing
>yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz. It
>seems
>to
>be a bogus file. Maybe you have configured your `urllist' with a
>bad URL. Please check this array with `o conf urllist', and
>retry.
>
>sh: yes/sources/authors/id/D/DC/DCONWAY/Text-Autoformat-1.04.tar.gz:
>No such fil
>e or directory
>Could not open >yes/build/DCONWAY000/Makefile.PL at (eval 26) line
>4219
------------------------------
Date: Wed, 30 May 2001 02:27:21 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: re-sizing GIF images on the fly
Message-Id: <slrn9h8mk9.div.mgjv@verbruggen.comdyn.com.au>
On Tue, 29 May 2001 08:58:20 GMT,
Bart Lateur <bart.lateur@skynet.be> wrote:
> Martien Verbruggen wrote (quoting):
>
>>>>Another aspect is that you want to save the scaled version again as
>>>>gif. The gif format is limited to 256 color palettes. But if you
>>>>scale using interpolation the resulting image is likely to contain
>>>>much greater number of colors than the original. This causes your
>>>>image to re-color quantized. Meaning that the palette is regenerated.
>>>
>>> OK, I think I understand this.
>>
>>You are doing better than I do, then :)
>
> Resampling might result in colours that are not in the original colour
> pace. For example, if you have only red and yellow pixels, and you scale
> down this pictures, ideally, a lot of intermediate oranges would have to
> appear in the palette.
Yes, I got that bit. It's mainly the last two sentences of that
paragraph that I had trouble with. Mainly because it depends on the
sampling method whether any palette is involved, and whether colours
get added or removed.
>>ImageMagick can be told to stay within the current palette.
>
> This will result in a less than optimal colour palette.
Possibly, even likely, but not necessarily. In any case, I included
more in later text to state that my preferred option would be to just
let the colours become what the sampling method needs them to be, and
then quantise the colour palette after the fact.
Quantisation always results in 'quality' loss, simply because you
remove colours that are in the original. If you don't want that, then
you should use a file format that supports a larger number of colours.
But I think we all agree on that, we just seem to be talking about the
same thing in slightly different ways.
Martien
--
Martien Verbruggen |
Interactive Media Division | Little girls, like butterflies, need
Commercial Dynamics Pty. Ltd. | no excuse - Lazarus Long
NSW, Australia |
------------------------------
Date: Wed, 30 May 2001 05:51:44 +0000 (UTC)
From: see-sig@from.invalid (David Efflandt)
Subject: Re: redirect
Message-Id: <slrn9h92jg.1nv.see-sig@typhoon.xnet.com>
On Tue, 29 May 2001 15:20:42 GMT, Todd Smith <todd@designsouth.net> wrote:
>
> "Juan Schwindt" <juan@schwindt.com.ar> wrote in message
> news:9f0du1$9fi$1@news.unitel.co.kr...
>> There is a simpler way to do it: sending the "Location" header, for
> example:
>>
>> print "Location: http://www.terra.com.ar/\n\n";
>>
>> Juan Schwindt.
>>
>
> Oh yeah! I forgot about that. Don't you need 3 newlines after it?
No, the spec calls for a blank line marking the end of headers, so the
first newline ends the header line and the 2nd newline ends the blank
line.
--
David Efflandt (Reply-To is valid) http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: 30 May 2001 13:38:11 +0800
From: Dan Jacobson <jidanni@kimo.FiXcomTHiS.tw>
Subject: showtables puts wasteful blanks at end of each line
Message-Id: <m2itijwg58.fsf@dan.jacobson.tw>
I used $ showtable -ti -t -d' '
and noticed that there is no way apparently to stop it from putting
wasteful blanks at the front and back of each line. The ones at the
front might be acceptable to center a printing a little further away
from the edge, but the ones at the back just waste file space.
You might want to fix it in the next distribution. Also there are
blank lines appended.
--
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.
------------------------------
Date: Wed, 30 May 2001 07:53:37 +0200
From: Philip Newton <pne-news-20010530@newton.digitalspace.net>
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <u419htcu9fits9t35p1kpk7843dqhd2rlo@4ax.com>
On Tue, 29 May 2001 15:57:38 -0000, Greg Bacon <gbacon@cs.uah.edu>
wrote:
> Top 10 Targets for Crossposts
> =============================
>
> Articles Newsgroup
> -------- ---------
>
> 36 alt.perl
> 29 comp.lang.perl
My goodness. Is this 29 clueless newbies crossposting here, or people
not bothering to change their "Newsgroups:" line when following up to an
article with bad headers?
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 30 May 2001 05:36:45 GMT
From: topmind@technologist.com (Topmind)
Subject: Re: The FlakeyMind Fatteus Byzerk
Message-Id: <MPG.157e218e9a68e1c79898c0@news.earthlink.net>
> ....
> >I NEVER CLAIMED THAT!!!!!!
> >THAT IS A FAT LIE! (Or bad reading on your part)
>
> >Why do you keep stating that same falsehood over and over
> >again, even after I corrected it in the past?
>
> It is typical troll behaviour to deny things he said in the past.
> Especially when they have said something stupid.
> Yet it is clearly on the record.
>
HEY SNOT-FOR-BRAINS:
I NEVER SAID THAT!!!!!!!!
I NEVER SAID THAT!!!!!!!!
I NEVER SAID THAT!!!!!!!!
I NEVER SAID THAT!!!!!!!!
PROVE I SAID OO==GUI's OR SHUT UP!
> .....
> >> False. OOP has it's roots in systems simulation, this
> >> opening assertion suggests that you need to do some
> >> serious research.
> >
> >I did not say it had its ROOTS in GUI's, I said it became popular because of
> >GUI's. Who is lacking in the "serious research" now? Birth and growth are
> >different.
>
> OK.He's backing off a little, but not much.
>
> Date: 1998/04/03
> Message #41
> >> OO's popularity was driven more by business modelling
> >> than it was by GUI's. [or hype]
>
> >This is where you and me disagree.
>
> Back to saying "OO is GUI".
>
I am talking about POPULARITY influence (of GUI's), and NOT
OO itself.
Big Fat Difference!
Go climb up a tree until you find OO betterment proof instead of
personally attacking me.
-T-
------------------------------
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 1016
***************************************