[23677] in Perl-Users-Digest
Perl-Users Digest, Issue: 5884 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 2 21:05:45 2003
Date: Tue, 2 Dec 2003 18:05:11 -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, 2 Dec 2003 Volume: 10 Number: 5884
Today's topics:
Re: count of items in a hash <REMOVEsdnCAPS@comcast.net>
Re: Display error message if an error occurs on "open" <nospam@nospam.com>
Don't Read - Testing <Alquemius@hotmail.com>
Re: Don't Read - Testing <asu1@c-o-r-n-e-l-l.edu>
Re: Don't Read - Testing <Alquemius@hotmail.com>
Re: Don't Read - Testing (Tad McClellan)
Re: Don't Read - Testing <usenet@morrow.me.uk>
Re: Don't Read - Testing <flavell@ph.gla.ac.uk>
Re: Don't Read - Testing (Tad McClellan)
Re: Don't Read - Testing <REMOVEsdnCAPS@comcast.net>
Re: hash key evaluation creates an entry ! <usenet@dwall.fastmail.fm>
Re: hash key evaluation creates an entry ! <bart.lateur@pandora.be>
Re: hash key evaluation creates an entry ! <REMOVEsdnCAPS@comcast.net>
Re: Perl v5.6.0 is not compatible with v5.8.0?? <Juha.Laiho@iki.fi>
Re: Perl v5.6.0 is not compatible with v5.8.0?? <usenet@morrow.me.uk>
Re: question about installation of GD::Text on cygwin ( <mgjv@tradingpost.com.au>
s// problem <bauerwo_removethis_@gmx.net>
Re: s// problem <noreply@gunnar.cc>
Re: Starting Perl Script at Bootup <abigail@abigail.nl>
Re: substitution question <nertz@numb.no>
Test post <ekulis@apple.com>
Re: Test post <REMOVEsdnCAPS@comcast.net>
Re: using GD module <eddGallary2@hotmail.com>
Re: using GD module <glex_nospam@qwest.invalid>
Re: using GD module <mgjv@tradingpost.com.au>
Re: using GD module <mgjv@tradingpost.com.au>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 02 Dec 2003 17:53:39 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: count of items in a hash
Message-Id: <Xns9445C065998B9sdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
"John W. Krahn" <krahnj@acm.org> wrote in news:3FCC86C1.2DF208FC@acm.org:
> "Eric J. Roode" wrote:
>>
>> print "There are ", scalar %set, " keys in %set.\n";
>
> That should be:
>
> print "There are ", scalar keys %set, " keys in %set.\n";
>
> 'scalar %set' will print something completely different. :-)
Whoops, of course. Thanks, John.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP80mRmPeouIeTNHoEQJ2cQCfcAJARcwKA7zyK50fxiu2cfCqoNwAn1au
slQ/bWSAX+V/Dv+pKG/WlGmj
=Uh8+
-----END PGP SIGNATURE-----
------------------------------
Date: Tue, 2 Dec 2003 15:04:06 -0800
From: "Geek" <nospam@nospam.com>
Subject: Re: Display error message if an error occurs on "open" command
Message-Id: <3fcca9f3$1@cpns1.saic.com>
Thanks to you and David. :)
"Tore Aursand" <tore@aursand.no> wrote in message
news:pan.2003.12.02.03.33.51.162216@aursand.no...
> On Mon, 01 Dec 2003 18:41:51 -0800, Geek wrote:
> > open (MAIL2, $blatString));
> >
> > I'd like something that displays the actual error encountered, [...]
>
> Use the $! operator.
>
>
> --
> Tore Aursand <tore@aursand.no>
> "To cease smoking is the easiset thing I ever did. I ought to know,
> I've done it a thousand times." -- Mark Twain
------------------------------
Date: Tue, 2 Dec 2003 22:00:56 +0100
From: "Alquemius" <Alquemius@hotmail.com>
Subject: Don't Read - Testing
Message-Id: <bqiu9a$h4i3@eui1nw.euskaltel.es>
Dont Read, that's a test!
------------------------------
Date: 2 Dec 2003 21:42:28 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: Don't Read - Testing
Message-Id: <Xns9445A9F6B3802asu1cornelledu@132.236.56.8>
"Alquemius" <Alquemius@hotmail.com> wrote in news:bqiu9a$h4i3
@eui1nw.euskaltel.es:
> Dont Read, that's a test!
This ensures that your posts will probably never be read or responded to.
--
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov
------------------------------
Date: Tue, 2 Dec 2003 23:34:17 +0100
From: "Alquemius" <Alquemius@hotmail.com>
Subject: Re: Don't Read - Testing
Message-Id: <bqj3oa$luu3@eui1nw.euskaltel.es>
Of course... that is what i intended... just testing if the account was
properly fixed...
Anyway... thanks!
Bye,
Txema
"A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> escribió en el mensaje
news:Xns9445A9F6B3802asu1cornelledu@132.236.56.8...
> "Alquemius" <Alquemius@hotmail.com> wrote in news:bqiu9a$h4i3
> @eui1nw.euskaltel.es:
>
> > Dont Read, that's a test!
>
> This ensures that your posts will probably never be read or responded to.
>
> --
> A. Sinan Unur
> asu1@c-o-r-n-e-l-l.edu
> Remove dashes for address
> Spam bait: mailto:uce@ftc.gov
------------------------------
Date: Tue, 2 Dec 2003 16:33:27 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Don't Read - Testing
Message-Id: <slrnbsq4pn.b0n.tadmc@magna.augustmail.com>
Alquemius <Alquemius@hotmail.com> wrote:
> Dont Read, that's a test!
If you were testing to see if a blatantly off-topic post
would get you widely killfiled, then the test succeeded!
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 2 Dec 2003 22:42:21 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Don't Read - Testing
Message-Id: <bqj4gd$a18$2@wisteria.csv.warwick.ac.uk>
"Alquemius" <Alquemius@hotmail.com> wrote:
> > This ensures that your posts will probably never be read or responded to.
> >
>
> Of course... that is what i intended... just testing if the account was
> properly fixed...
No, *all* your posts, *ever*.
Ben
--
Although few may originate a policy, we are all able to judge it.
- Pericles of Athens, c.430 B.C.
ben@morrow.me.uk
------------------------------
Date: Tue, 2 Dec 2003 23:33:43 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Don't Read - Testing
Message-Id: <Pine.LNX.4.53.0312022326351.20227@ppepc56.ph.gla.ac.uk>
On Tue, 2 Dec 2003, Ben Morrow revealed to the world that:
> "Alquemius" <Alquemius@hotmail.com> wrote:
> >
> > Of course... that is what i intended... just testing if the account was
> > properly fixed...
Damn right it's "properly fixed": in the permanent killfile.
> No, *all* your posts, *ever*.
As I see it, the options are very simple.
If someone needs to post (to a normal group), it's because they have
something to say to usenet. By posting whatever it is that they have
to say to usenet, they get a free test too.
If they have nothing to say to usenet, then it doesn't matter whether
they post or not. Consequently, they have no need to make any test.
If they're too empty-headed to grasp that, I'm not sure what use it
would be to call their attention to the *.test groups.
Ho hum. F'ups prophylactically redirected.
------------------------------
Date: Tue, 2 Dec 2003 17:44:53 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Don't Read - Testing
Message-Id: <slrnbsq8vl.1ko.tadmc@magna.augustmail.com>
[ Please do not top-post.
Please do not full-quote.
]
Alquemius <Alquemius@hotmail.com> wrote:
> "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> escribió en el mensaje
> news:Xns9445A9F6B3802asu1cornelledu@132.236.56.8...
>> "Alquemius" <Alquemius@hotmail.com> wrote in news:bqiu9a$h4i3
>> @eui1nw.euskaltel.es:
>>
>> > Dont Read, that's a test!
>>
>> This ensures that your posts will probably never be read or responded to.
> Of course... that is what i intended...
I think you misunderstand.
Many of the regulars here have made an entry in their
newsreader's configuration to automatically delete every
future post from Alquemius@hotmail.com
(you should use a testing newgroup for testing, we discuss
Perl in this here newsgroup)
Why you would intend for the most-willing of question answerers to
forever ignore your questions is a mystery...
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 02 Dec 2003 19:12:19 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Don't Read - Testing
Message-Id: <Xns9445CDBB339E5sdn.comcast@216.196.97.136>
"Alquemius" <Alquemius@hotmail.com> wrote in news:bqiu9a$h4i3
@eui1nw.euskaltel.es:
> Dont Read, that's a test!
There are test newsgroups for this purpose (e.g. alt.test). Please don't
pollute a technical newsgroup with test posts.
--
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
------------------------------
Date: Tue, 02 Dec 2003 19:43:15 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: hash key evaluation creates an entry !
Message-Id: <Xns944595BF85F9Cdkwwashere@216.168.3.30>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> David K. Wall <usenet@dwall.fastmail.fm> wrote in
> comp.lang.perl.misc:
>>
>> Ok, so $#foo gives the *index* of the last element of the array,
>> not the size of the array minus one. Other than setting the
>> indices of an array to start with something other than zero (but
>> don't do that), is there any situation where
>>
>> scalar @foo == $#foo + 1
>>
>> is NOT true? Or is the $# syntax available just in case someone
>> DOES start array indexing with something other than zero?
>>
>> (It's not really important to me, I'm just curious.)
>
> Your curiosity is satisfied in perlvar, which states:
Thanks, I missed that when I checked the docs -- but it's in perldata,
not perlvar. (I thought for a minute that my copy of Perl was too old,
but 5.8.0 isn't *that* old.)
--
David Wall
------------------------------
Date: Tue, 02 Dec 2003 21:34:45 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: hash key evaluation creates an entry !
Message-Id: <t91qsvchbsk72gu7rkafphimupkva5p5et@4ax.com>
Edo wrote:
>this line
>40: if ($#{$set{'1'}} == $enf) {
>creates an entry
Then check if it exists first. If the hash only contains array
references, you don't need "exists".
if ($set{'1'} && $#{$set{'1'}} == $enf) {
--
Bart.
------------------------------
Date: Tue, 02 Dec 2003 19:10:28 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: hash key evaluation creates an entry !
Message-Id: <Xns9445CD6B0C14Csdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
"David K. Wall" <usenet@dwall.fastmail.fm> wrote in
news:Xns9445699AA8B76dkwwashere@216.168.3.30:
> Ok, so $#foo gives the *index* of the last element of the array, not
> the size of the array minus one. Other than setting the indices of an
> array to start with something other than zero (but don't do that), is
> there any situation where
>
> scalar @foo == $#foo + 1
>
> is NOT true?
Not really; 99.999% of the time you can make that assumption with glee.
> Or is the $# syntax available just in case someone DOES
> start array indexing with something other than zero?
It's a holdover from a now-deprecated feature of Perl v4 (and prior, I
suppose).
In my opinion, $#foo is moderately cryptic, and is only really useful
with the range operator, as in:
@some = @foo[4..$#foo];
Some people use it for those times when you have to loop (C-style) over
an array:
for (my $i=0; $i<=$#foo; $i++)
but I prefer:
for (my $i=0; $i<@foo; $i++)
YMMV.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP804RWPeouIeTNHoEQLKIwCg5LXYYk7qX+mYWinXmLCgctx2z4sAoKu0
YvuiKPeNIROcRVd3Duwo6enI
=/TND
-----END PGP SIGNATURE-----
------------------------------
Date: Tue, 02 Dec 2003 20:17:00 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: Perl v5.6.0 is not compatible with v5.8.0??
Message-Id: <bqirod$ojp$1@ichaos.ichaos-int>
JZ <jroznfgre@jngpugbjreQBGbet.cy> said:
>I have a strange problem with Perl. When I execute indexer.pl script
>(from ksearch http://www.kscripts.com/scripts.shtml) with Perl 5.6.0
>/ RedHat 7 it works fine. But if I execute the same script on another
>computer working with Perl 5.8.0 / RedHat 9, I receive lots errors
>like that:
>
>Malformed UTF-8 character (overflow at 0x2ca77a73), byte 0x79, after
>start byte 0xbf) in substitution (s///) at ./indexer.pl line 353
Hmm.. I think the default installation on RH9 set the system default
character set to UTF-8 -- and could be that you're not overriding
it when running your indexer - so the indexer is following that
default.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
------------------------------
Date: Tue, 2 Dec 2003 22:27:31 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Perl v5.6.0 is not compatible with v5.8.0??
Message-Id: <bqj3ki$a18$1@wisteria.csv.warwick.ac.uk>
JZ <jroznfgre@jngpugbjreQBGbet.cy> wrote:
> I have a strange problem with Perl. When I execute indexer.pl script
> (from ksearch http://www.kscripts.com/scripts.shtml) with Perl 5.6.0
> / RedHat 7 it works fine. But if I execute the same script on another
> computer working with Perl 5.8.0 / RedHat 9, I receive lots errors
> like that:
>
> Malformed UTF-8 character (overflow at 0x2ca77a73), byte 0x79, after
> start byte 0xbf) in substitution (s///) at ./indexer.pl line 353
RH9 has a UTF8 locale set by default. Perl 5.8.0 takes notice of that,
and expects all your files to bu UTF8, by default.
So, there are three solutions:
1. Change your default locale, given you don't use utf8.
2. Upgrade to >5.8.1, which has this default behaviour removed as it
caused lots of problems.
3. Add C< use open ':encoding(iso8859-2)' > at the top of your script.
Ben
--
And if you wanna make sense / Whatcha looking at me for? (Fiona Apple)
* ben@morrow.me.uk *
------------------------------
Date: 02 Dec 2003 22:26:41 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: question about installation of GD::Text on cygwin (could be a Makefile q)
Message-Id: <slrnbsq4d3.5j7.mgjv@verbruggen.comdyn.com.au>
On 1 Dec 2003 20:13:20 -0800,
Upstart <stimonyhall@netscape.net> wrote:
> "Randy Kobes" <randy@theoryx5.uwinnipeg.ca> wrote in message news:<vkJyb.33803$MW5.49636@news1.mts.net>...
>> "Upstart" <stimonyhall@netscape.net> wrote in message
>> news:79516caa.0312010615.143302a3@posting.google.com...
>> > Hi
>> >
>> > For background: I am trying to install a few modules with an
>> > environment of Cygwin w/ windows 2000. The module I am stuck on is
>> > GD::Text.
[snip]
>> > that's it... no Makefile. no error messages. I am building other
>> > modules (Like GD) and this step builds a Makefile with those modules.
>> If you comment out all the stuff at the beginning of Makefile.PL
>> involving eval{}, and just leave the WriteMakefile() call in, is a
>> Makefile produced?
>
> Ok... started hacking at this...
>
> On Mon, 1 Dec 2003, Martien Verbruggen wrote:
>
>> Try commenting out everything but the call to WriteMakefile(). Then
>> uncomment the MY::postamble, then MY::libscan, then one by one the two
>> tests (eval followed by if) at the top. None of it should break the
>> writing of a Makefile, but at least we'll know what does it. Maybe a
>> few well-placed debugging statements in the breaking bits could
>> pinpoint it a bit more.
>>
>> I don't really see anything in the code that could cause this sort of
>> breakage though....
>
> Couple of things as a result of this direction (thanks to both guys
> for direction):
>
> - I have isolated the code snippet(s) that cause the problem. The hash
> value for PREREQ_PM and the "TTF eval" (see diff below).
The PREREQ_PM line broke the creation of a Makefile? Without messages?
> - There is no MY::libscan in the Makefile.PL, only postamble.
You're right. I was looking at my working copy, not realising that I
had changed Makefile.PL after 0.86.
> - If I add a "use GD;" line at the top of the page, the silent failure
> to create a Makefile is exhibited again. I did this to see if my GD
> was broken. I am running GD 2.11.
That is odd. very odd. I don't see how the inclusion of GD would
conflict with MakeMaker.
Just for the heck of it, could you do something like:
$ cd /tmp
$ h2xs -ACXn Foo
Writing Foo/Foo.pm
Writing Foo/Makefile.PL
Writing Foo/README
Writing Foo/test.pl
Writing Foo/MANIFEST
$ cd Foo
[edit Makefile.PL and put "use GD;" near the top]
$ perl Makefile.PL
If that breaks, then the problem is somewhere in the interaction
between GD and MakeMaker, and that's probably worth a bug report to
either P5P of Lincoln Stein.
If that doesn't break, please continue...
> - I have confirmed that my GD implementation works by creating a
> simple black jpeg
> - removing these sections allowed me to create the Makefile. I could
> send if anyone is interested. I don't know if this is valid yet. I
> will run tomorrow.
>
> Here is the diff:
>
> $ diff Makefile.PL Makefile.f
> 5c5
><
> ---
>> #use GD;
> 17,32d16
>< eval
>< {
>< local $SIG{'__WARN__'};
>< require GD;
>< require File::Spec;
>< require Cwd;
><
>< GD::Image->can('stringTTF')
>< or die "One";
>< GD::Image->stringTTF(0, 'foo', 10, 0, 0, 0, 'foo');
>< $@ =~ /TrueType font support/i
>< and die "Two";
>< my $test_font = File::Spec->catfile(Cwd::cwd(),
> "Dustismo_Sans.ttf");
>< GD::Image->stringTTF(0, $test_font, 10, 0, 0, 0, 'foo')
>< or die "Three: $@";
>< };
And I do need to test for this. I got too many reports about tests
failing, only to have to talk the person reporting it through
correctly installing GD. This test is there to prevent those GD
installations where libgd is compiled differently from GD to cause my
mailbox to be filled.
What I'd like to know is why this piece of code causes Makefile.PL
_not_ to write out a Makefile. It's all neatly wrapped in an eval.
I'd expect the test to either fail, or not. In either case, nothing in
here should influence anything outside of the code block and the
following if block.
I don't think I will remove the test from the distribution. I'm
willing to fix whatever is breaking here, even though I don't believe
anything should be breaking.
I don't have your platform, so I can't even begin to try to reproduce
this. Could you give me some more information about your platform?
Versions of cygwin, perl, ExtUtils::MakeMaker, GD, Cwd, File::Spec,
etc? I know I'm asking a bit here, but the alternative is that I have
to write it up as a "broken installation" and ignore the problem. I'd
rather try to find out what exactly the problem is.
Just a weird hunch: If you change the "require Cwd;" to "use Cwd;",
does that change anything? It shouldn't, but you never know... And
File::Spec? Both modules are used internally in the MakeMaker stuff,
maybe the missing import is confusing things, even though I believe it
shouldn't.
The remark about "use GD;" earlier indicates that the "require GD;"
breaks things. However, that is just too weird.
> 55,56c39
>< 'VERSION_FROM' => 'Text.pm',
>< 'PREREQ_PM' => { 'GD' => 1 },
Hmmm.. I'd like to leave this in. Maybe I'll just set it to 0. Could
you try that instead? GD::Text has a prerequisite that some version of
GD is installed, so I'd like the Makefile.PL to express that.
Martien
--
|
Martien Verbruggen | Useful Statistic: 75% of the people make up
Trading Post Australia | 3/4 of the population.
|
------------------------------
Date: 2 Dec 2003 21:33:54 +0100
From: "W. Bauer" <bauerwo_removethis_@gmx.net>
Subject: s// problem
Message-Id: <Xns9445DB24CAB56bauerwo@195.186.4.29>
Hello
I don't get my first s// working: I would like to replace spaces by ; but
only if the space is not within double quotes where some can be between the
space and the quotes. Example:
"abc def" a -->"abc def";a
[^"][^a-z]+[\s][^a-z]+[^"]
matches these spaces correctly. But
s/[^"][^a-z]+[\s][^a-z]+[^"]/;/
does not work properly. Thanks for any hint,
W. Bauer
------------------------------
Date: Tue, 02 Dec 2003 22:08:52 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: s// problem
Message-Id: <bqiv01$23spld$1@ID-184292.news.uni-berlin.de>
W. Bauer wrote:
> I don't get my first s// working: I would like to replace spaces by
> ; but only if the space is not within double quotes where some can
> be between the space and the quotes.
You didn't exactly choose a simple first s/// task. :)
> Example:
>
> "abc def" a -->"abc def";a
>
> [^"][^a-z]+[\s][^a-z]+[^"]
> matches these spaces correctly.
How did you reach that conclusion? (It doesn't.)
I think this does what you want:
s/("[^"]*")|\s+/ $1 || ';' /eg;
Please study "perldoc perlre" and "perldoc perlop" more carefully to
get an understanding of what it does.
It should be noted that there also are modules for handling this kind
of replacement. Text::ParseWords is worth exploring, for instance.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 03 Dec 2003 00:29:39 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Starting Perl Script at Bootup
Message-Id: <slrnbsqbjj.eu.abigail@alexandra.abigail.nl>
Matt (nospam@yahoo.com) wrote on MMMDCCXLV September MCMXCIII in
<URL:news:vsnvuj6bl44ge5@corp.supernews.com>:
() I have a perl script I would like to have run every time my server boots up.
() Its running Redhat Linux. How would I do that?
You can't. Only C programs can be run when the server boots up.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: Tue, 2 Dec 2003 13:53:17 -0600
From: sparkane <nertz@numb.no>
Subject: Re: substitution question
Message-Id: <MPG.1a36a9ab8d62ef6f98968c@news-central.giganews.com>
Thanks to both of you!
------------------------------
Date: Tue, 02 Dec 2003 15:03:01 -0800
From: Ed Kulis <ekulis@apple.com>
Subject: Test post
Message-Id: <BBF25A25.9E18%ekulis@apple.com>
Test post
------------------------------
Date: Tue, 02 Dec 2003 19:12:55 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Test post
Message-Id: <Xns9445CDD58B986sdn.comcast@216.196.97.136>
Ed Kulis <ekulis@apple.com> wrote in news:BBF25A25.9E18%ekulis@apple.com:
> Test post
There are test newsgroups for that purpose (e.g. alt.test). Please don't
pollute a technical newsgroup with test posts.
--
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
------------------------------
Date: Wed, 03 Dec 2003 06:39:55 +1100
From: Edo <eddGallary2@hotmail.com>
Subject: Re: using GD module
Message-Id: <3FCCEA8B.2090707@hotmail.com>
thanks
ok, here is what I did
#!/usr/local/bin/perl
use strict;
use warnings;
use GD::Graph::line;
my @data = (
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
[ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
[ sort { $a <=> $b } (1, 2, 5, 6, 3, 1.5, 1, 3, 4) ]
);
my $graph = GD::Graph::chart->new(400, 300);
$graph->set(
x_label => 'X Label',
y_label => 'Y label',
title => 'Some simple graph',
y_max_value => 8,
y_tick_number => 8,
y_label_skip => 2
) or die $my_graph->error;
my $gd = $my_graph->plot(\@data) or die $my_graph->error;
$ perl prog/graph
Can't locate GD/Graph/line.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.2/i686-linux /usr/local/lib/perl5/5.8.2
/usr/local/lib/perl5/site_perl/5.8.2/i686-linux
/usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl .)
at prog/graph line 4.
BEGIN failed--compilation aborted at prog/graph line 4.
:~$
well, I think I installed GD::Graph allright.
$ /bin/su
Password:
~# /usr/local/bin/perl -MCPAN -e 'install "GD::Graph"'
all was ok
hummmm
------------------------------
Date: Tue, 02 Dec 2003 14:40:02 -0600
From: "J. Gleixner" <glex_nospam@qwest.invalid>
Subject: Re: using GD module
Message-Id: <NI6zb.21$GJ2.39371@news.uswest.net>
Edo wrote:
> thanks
>
> ok, here is what I did
>
> #!/usr/local/bin/perl
> use strict;
> use warnings;
> use GD::Graph::line;
[...]
> my $graph = GD::Graph::chart->new(400, 300);
use GD::Graph::lines;
GD::Graph::lines->new(...)
------------------------------
Date: 03 Dec 2003 01:09:58 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: using GD module
Message-Id: <slrnbsqdv8.5j7.mgjv@verbruggen.comdyn.com.au>
On Wed, 03 Dec 2003 04:24:11 +1100,
Edo <eddGallary2@hotmail.com> wrote:
> Hello
> I am very novice in the areas of using modules, this GD::Graph is a bit
> over my head at this time.
>
> what is wrong with this, mostly taken out of the doc examples.
>
> #!/Usr/local/bin/perl
Depending on your platform, and how you invoke your program, this
might not work. Generally, the /usr/ filesystem is not capitalised.
> my $graph = GD::Graph::chart->new(400, 300); <---line 12
As the documentation also explains, the "chart" bit in there is just a
placeholder for one of the valid chart types. Quote:
Create a new GD::Graph object by calling the new method on the
graph type you want to create (chart is bars, hbars, lines,
points, lines- points, mixed or pie).
So all you need to do is pick one of those.
Martien
--
|
Martien Verbruggen |
Trading Post Australia | 42.6% of statistics is made up on the spot.
|
------------------------------
Date: 03 Dec 2003 01:11:17 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: using GD module
Message-Id: <slrnbsqe1n.5j7.mgjv@verbruggen.comdyn.com.au>
On Wed, 03 Dec 2003 06:39:55 +1100,
Edo <eddGallary2@hotmail.com> wrote:
> thanks
>
> ok, here is what I did
> use GD::Graph::line;
use GD::Graph::lines;
> my $graph = GD::Graph::chart->new(400, 300);
my $graph = GD::Graph::lines->new(400, 300);
Martien
--
|
Martien Verbruggen | You can't have everything, where would you
Trading Post Australia | put it?
|
------------------------------
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 5884
***************************************