[12161] in Perl-Users-Digest
Perl-Users Digest, Issue: 5761 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 24 02:07:17 1999
Date: Sun, 23 May 99 23:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 23 May 1999 Volume: 8 Number: 5761
Today's topics:
Re: ANNOUNCE: Champaign-Urbana.pm Meeting Tue May 25 (Daniel S. Lewart)
Re: conditional regexp matching. Please advise. (Ronald J Kimball)
Re: creating system command at runtime (Ronald J Kimball)
Does any body have a pointer to CGI SPACE Games? <vthamman@usa.net>
Re: Does any body have a pointer to CGI SPACE Games? <vthamman@yahoo.com>
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe (Ronald J Kimball)
Filename Demanger. <pgeorge@ns.sympatico.ca>
Re: Finding Diff of two files (Ronald J Kimball)
HELP: can't locate loadable object for module Time::Hir jbell@263.net
hey tom, slow the func down! <uri@sysarch.com>
Re: I found a bug, do I? about perl typing globbing <rick.delaney@home.com>
Re: Mac-specific Perl help requested - The Answer (foll (Henry Penninkilampi)
Re: Mac-specific Perl help requested - The Answer (yet <josh@bitwell.net>
Re: Mod of large number <tchrist@mox.perl.com>
Re: Perl "constructors" armchair@my-dejanews.com
Re: Perl "constructors" armchair@my-dejanews.com
Re: simple question (Ronald J Kimball)
Re: simple question <jbc@shell2.la.best.com>
Re: Storing GD::Image <brad@wcubed.net>
Transliteration Operator Problem billy_collins@my-dejanews.com
Re: trouble with constants declared in a module <jdf@pobox.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 May 1999 05:38:52 GMT
From: d-lewart@uiuc.edu (Daniel S. Lewart)
Subject: Re: ANNOUNCE: Champaign-Urbana.pm Meeting Tue May 25
Message-Id: <7iaolc$ko$1@vixen.cso.uiuc.edu>
> Our May meeting will be:
> Tue May 25 19:00 CDT
> Papa Del's
> 206 E Green St
> Champaign, IL
Special guest guru: Randal Schwartz!
Dan
http://cmi.pm.org/
------------------------------
Date: Sun, 23 May 1999 22:49:01 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: conditional regexp matching. Please advise.
Message-Id: <1dsa1cj.gnskgl1b1ijxeN@[207.60.170.90]>
Ravi Kumar <ravik@cyrix.com> wrote:
> How can I do this in perl with a single regexp? Why a single regexp?
> Convinience
Ironically, your search for convenience seems to be inconveniencing you
quite a bit, in that you are passing up a simple, effective solution in
the hopes of finding a more complicated one.
> and the hope that it can indeed be done using some manipulation of the ?! or
> ?= operations.
It probably could, but I suspect that the result would be ugly and less
efficient.
I believe that some operations just work better when split among several
regexes.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'
------------------------------
Date: Sun, 23 May 1999 22:49:03 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: creating system command at runtime
Message-Id: <1dsa1ku.1lidnut1yjsldsN@[207.60.170.90]>
Eric Smith <eric@fruitcom.com> wrote:
> Can I supply a globbing reference on the command line which will be passed
> to in my @ARGV and have perl do all this dirty work for me?
Perhaps you want something like:
~> myscript '*.jpeg'
#/usr/local/bin/perl
# myscript
# ...
@files = glob($ARGV[0]) if defined $ARGV[0];
# ...
But you could just have the globbing done by the shell:
~> myscript *.jpeg
#/usr/local/bin/perl
# myscript
# ...
@files = @ARGV;
# ...
If that's not what you were looking for, could you clarify the question?
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 23 May 1999 20:46:55 -0700
From: Venugopal Thammana <vthamman@usa.net>
Subject: Does any body have a pointer to CGI SPACE Games?
Message-Id: <3748CBAF.DA30AA99@usa.net>
Hi! folks,
I am looking for some nice website where I can find some CGI scripts
for Games, especially something related to SPACE.
Thanks for the help.
Venu
------------------------------
Date: Sun, 23 May 1999 20:48:12 -0700
From: Venugopal Thammana <vthamman@yahoo.com>
Subject: Re: Does any body have a pointer to CGI SPACE Games?
Message-Id: <3748CBFC.B8FEEE0A@yahoo.com>
BTW, my e-mail address is now "vthamman@yahoo.com"
Thanks,
Venu
Venugopal Thammana wrote:
> Hi! folks,
>
> I am looking for some nice website where I can find some CGI scripts
> for Games, especially something related to SPACE.
>
> Thanks for the help.
> Venu
------------------------------
Date: Sun, 23 May 1999 22:49:05 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <1dsa2m4.1agl426w4kykaN@[207.60.170.90]>
hymie! <hymie@lactose.smart.net> wrote:
> I found a quote once ...
>
> It's not Perl's fault if you don't know how to program. --Ronald J Kimball
>
> ... and kept it in my set of random sigs.
Ironically, I originally wrote that in a discussion about, what else,
localtime() returning the year as an offset from 1900.
Old threads never die... They just resurface a month later with a new
subject line.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"Remember, Perl doesn't write bad programs; programmers do."
------------------------------
Date: Mon, 24 May 1999 01:30:50 -0300
From: Foozle <pgeorge@ns.sympatico.ca>
Subject: Filename Demanger.
Message-Id: <3748D5FA.140E59E3@ns.sympatico.ca>
Im extremely new to Perl no idea wtf im doing particularly just
needed something that'd demangle queer filenames from newsgroup binary
posts that are valid to unix
but are impossible to move over to a samba shared drive (files
particularly with : and \'s in them)
example:
drwxr-xr-x 2 pgeorge users 1024 May 23 08:08 .
drwxr-xr-x 15 pgeorge users 2048 May 23 08:03 ..
-rw-rw-r-- 1 pgeorge pgeorge 0 May 23 08:08
This:file\will.work.jpg
-rw-rw-r-- 1 pgeorge pgeorge 0 May 23 08:04
c:\nsmail\McTasty.jpg
-rwxrwxr-x 1 pgeorge pgeorge 283 May 22 20:29 demangle
[pgeorge@SnakeGate ~/demangle]$
Heres my ultra-lame program which I came up with after reading 5 mins of
a beginners perl webpage:
--------------------------------------------------------------
#!/usr/bin/perl
$x = "";
$d = "";
$rename = "/bin/mv";
while($x = <*>) {
$d = $x;
print "Name before mangling : $d\n";
$x =~ s/(\\|:|\\\\)/_/g;
print "Name after mangling : $x\n";
exec ("$rename","$d","$x",@ARGV);
}
-------------------------------------------------------------
I run the program on the above directory here are the results:
[pgeorge@SnakeGate ~/demangle]$ ./demangle
Name before mangling : This:file\will.work.jpg
Name after mangling : This_file_will.work.jpg
[pgeorge@SnakeGate ~/demangle]$ v
total 4
drwxr-xr-x 2 pgeorge users 1024 May 23 08:17 .
drwxr-xr-x 15 pgeorge users 2048 May 23 08:03 ..
-rw-rw-r-- 1 pgeorge pgeorge 0 May 23 08:08
This_file_will.work.jpg
-rw-rw-r-- 1 pgeorge pgeorge 0 May 23 08:04
c:\nsmail\McTasty.jpg
-rwxrwxr-x 1 pgeorge pgeorge 281 May 23 08:17 demangle
[pgeorge@SnakeGate ~/demangle]$
For some reason it isnt touching the "c:\nsmail..." filename for some
reason
even though it too contains ': and \' .Can any help me out a little on
this one ? If you completely re-write my script can you please put ample
inline comments so I know whats going on (more or less).
Thank You Muchly
-George-
------------------------------
Date: Sun, 23 May 1999 22:49:11 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Finding Diff of two files
Message-Id: <1dsa2x5.1j991aoisnps2N@[207.60.170.90]>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Fri, 21 May 1999 21:27:35 GMT anilpn@my-dejanews.com wrote:
> > I have two files in my vars:
> > @file & @file2
> >
> > How can I find the diff of the two
> > files, using perl in a simple way ?
> >
>
> If you actually have your two files in arrays as you show then you
> should read perlfaq4:
>
> How do I compute the difference of two arrays? How do I
> compute the intersection of two arrays?
diff of two files and difference of two arrays are rather different
concepts. File diff looks for differences all the way down to the level
of characters, even allowing for addition and deletion, whereas the FAQ
deals only with difference at the level of array elements.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Mon, 24 May 1999 03:08:57 GMT
From: jbell@263.net
Subject: HELP: can't locate loadable object for module Time::Hires in @INC
Message-Id: <7iafs8$71c$1@nnrp1.deja.com>
Hi, all,
When I was trying to use this module, it says:
can't locate loadable object for module Time::Hires in @INC(...)
I checked my code, nothing seems wrong.
what could be the problem?
Thanks in advance!
Rgds,
Jimmy
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 24 May 1999 00:59:57 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: hey tom, slow the func down!
Message-Id: <x7btfbgj02.fsf@home.sysarch.com>
i think the func posts are coming too often. they should be
posted maybe 3 times a day.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 24 May 1999 02:41:58 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: I found a bug, do I? about perl typing globbing
Message-Id: <3748BC22.3EB13448@home.com>
[posted & mailed]
H.C. Chen wrote:
>
> This is the error message I have got :
> G:\>perl argglob
> In string, @arraya now must be written as \@arraya at
> argglob line 16, near "Array 1 is @arraya"
Error messages are documented in the perldiag manpage. The reason you
received this error message is fully explained in this document.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Mon, 24 May 1999 12:36:13 +0930
From: spamfree@metropolis.net.au (Henry Penninkilampi)
Subject: Re: Mac-specific Perl help requested - The Answer (followup)
Message-Id: <spamfree-2405991236160001@d5.metropolis.net.au>
Josh,
Mate, settle down.
First, you seem to be forgetting that it is the *operating system* which
defines what ASCII code represents a given key (code), not the
application. When you're on a *Mac*, it's ASCII 13, on a *Unix* box it's
ASCII 10. It's an operating system issue, pure-and-simple. If you want
to point a 'you started it all' finger at someone, then blame Apple for
thinking different back in 1984.
Second, losing three hours learning how to overcome an obstacle in MacPerl
will, in all likelihood, be more than made up for by the amount of time
you will save on your current project. Over the course of your MacPerl
programming career, you will probably save hundreds of times that much.
In the long-run, you save time, you don't lose it.
Third, when I had the same problem (not too long ago), it took me the good
part of two or three minutes to find a solution. What did I do? I simply
plugged [+macperl +unix +files +'\n'] into an AltaVista simple query and
took it from there. If it's taking you three hours, then you either a)
need some sleep to clear your head, or b) need to take a refresher course
in how to use search engines. Your apparent inability to conduct
effective online research has nothing to do with MacPerl.
Finally, Matthias Neeracher has spent thousands of hours developing
MacPerl. He's given up a sizeable chunk of his life in order to make life
easy for others, and he's asked for nothing in return. You, on the other
hand, seem to have contributed sweet FA to the community, seem to sponge
off the goodwill of others, consider it a God-given right, and have the
gall to demand more! Just who the hell do you think you are?
The attitude you have displayed in your posts *really* bugs me. On the
other hand, we all have really bad days, so I'm going to assume that
you're having one of those days. A day where the world seems to conspire
against you and getting your work done. My suggestion: Go home, take the
phone off the hook, and get some sleep. It sounds like you need it.
Henry.
------------------------------
Date: Mon, 24 May 1999 05:19:14 GMT
From: Josh Pointer <josh@bitwell.net>
Subject: Re: Mac-specific Perl help requested - The Answer (yet another followup)
Message-Id: <3748E22A.60BF@bitwell.net>
Henry Penninkilampi wrote:
>
> First, you seem to be forgetting that it is the *operating system* which
> defines what ASCII code represents a given key (code), not the
> application. When you're on a *Mac*, it's ASCII 13, on a *Unix* box it's
> ASCII 10. It's an operating system issue, pure-and-simple. If you want
> to point a 'you started it all' finger at someone, then blame Apple for
> thinking different back in 1984.
Henry, \n is not an operating system definition; it's a Perl definition.
On UNIX, it corresponds to ASCII 10 (\f?). On Mac, ASCII 13 (\r). The
mapping of \n is not immutable.
> Second, losing three hours learning how to overcome an obstacle in MacPerl
> will, in all likelihood, be more than made up for by the amount of time
> you will save on your current project. Over the course of your MacPerl
> programming career, you will probably save hundreds of times that much.
> In the long-run, you save time, you don't lose it.
As true as that is, it in no way mitigates my original, utterly benign
statement. The documentation should have addressed the issue.
> Third, when I had the same problem (not too long ago), it took me the good
> part of two or three minutes to find a solution. What did I do? I simply
Then between us we've lost 3 hours and 3 minutes we need never have
lost.
> plugged [+macperl +unix +files +'\n'] into an AltaVista simple query and
> took it from there. If it's taking you three hours, then you either a)
> need some sleep to clear your head, or b) need to take a refresher course
> in how to use search engines. Your apparent inability to conduct
> effective online research has nothing to do with MacPerl.
Insulting me serves no useful purpose.
> Finally, Matthias Neeracher has spent thousands of hours developing
> MacPerl. He's given up a sizeable chunk of his life in order to make life
> easy for others, and he's asked for nothing in return.
And my position is: given the fact that he committed so much time to the
port, why was an additional minute or two to properly document his
project's behavior more than could be spared?
> You, on the other
> hand, seem to have contributed sweet FA to the community, seem to sponge
> off the goodwill of others, consider it a God-given right, and have the
> gall to demand more! Just who the hell do you think you are?
a. I've neither denied Mr. Neeracher's contribution nor claimed any of
my own.
b. I've sponged nothing.
c. I consider nothing relating in any way to Perl to be a right,
God-given or otherwise.
d. I've demanded nothing.
e. Josh Pointer
f. Attacking me serves no useful purpose
> The attitude you have displayed in your posts *really* bugs me.
I can't help but think you to be one who might be rather easily bugged,
as I have no particular attitude to speak of with regard to this matter,
and, in reviewing my previous posts, can discern none therein.
> On the
> other hand, we all have really bad days, so I'm going to assume that
> you're having one of those days. A day where the world seems to conspire
> against you and getting your work done. My suggestion: Go home, take the
> phone off the hook, and get some sleep. It sounds like you need it.
I'm quite well rested and having a fine day, but thank you for your
concern.
> Henry.
I must say that I don't understand this post at all, either in tone or
intent. My point has been simple and consistent from the beginning.
1. MacPerl behaves differently than Perl with respect to its treatment
of newlines.
2. That behavior should be documented, as MacPerl is a port whose
behavior should be expected to emulate that of its parent.
3. That behavior is not documented.
4. I found an elaborated explaination and posted it.
Where one finds offense in this, I don't quite know.
Regards,
Josh Pointer
josh@bitwell.net
------------------------------
Date: 23 May 1999 20:05:18 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Mod of large number
Message-Id: <3748b3de@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
=?iso-8859-1?Q?Cyb=EER?= <cybir@echoweb.net> writes:
:I'm trying to take mod 3337 of 180**79 but
:
:$x = 180**79 % 3337;
:
:gives me 0 always, what am I doing wrong?
You're expecting your computer to give you infinite precision. That's
pretty silly. I think you need to go back to your floating-point numbers
class. :-) 180**79 is 1.4673303589788e+178 as a double. Even once you
have a new enough Perl to use fmod(), you still get 1357.
Perhaps you were expecting 180**79 to produce 14 673 303 589 787 954
773 596 751 197 966 772 541 538 765 362 718 375 015 940 000 435 165 527
420 451 089 509 602 811 196 022 456 320 000 000 000 000 000 000 000 000
000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
which when modded leaves you with 2645.
As has been observed in days of old, God created the integers--all else
is the work of Man. Computers do not work with numbers, you know.
They merely fake it. And faking it means cutting corners for the
common cases. You can balance your check book with them, but you'll
not be very happy when it comes to real numbers.
--tom
--
"... the whole documentation is not unreasonably transportable in a
student's briefcase." - John Lions describing UNIX 6th Edition
"This has since been fixed in recent versions." - Kernighan & Pike
------------------------------
Date: Mon, 24 May 1999 02:06:37 GMT
From: armchair@my-dejanews.com
Subject: Re: Perl "constructors"
Message-Id: <7iac7d$4f5$1@nnrp1.deja.com>
In article <slrn7kh415.6qs.sholden@pgrad.cs.usyd.edu.au>,
sholden@cs.usyd.edu.au wrote:
> On Sun, 23 May 1999 14:54:57 GMT, armchair@my-dejanews.com wrote:
>
> >my Hooziwhatzit $a ....
> >Are you presenting that as a legal statement?
>
> Learn some perl and try it yourself...
Hey Sam, where you been! Well I tried it:
-------------------------------------
!/usr/bin/perl -w
use diagnostics;
use strict;
use Object;
my Object $a = Object->new();
print $a->GetValue();
------------------------------------
and no complaints. I'll have to RTFM and see where they mention that.
> --
> Sam
>
"If you buy an Aussie a beer, you make him happy for a day, if you show
him how to use a homebrew kit, you won't see him in town for months"
- Mel Gibson
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Mon, 24 May 1999 05:11:36 GMT
From: armchair@my-dejanews.com
Subject: Re: Perl "constructors"
Message-Id: <7ian27$bif$1@nnrp1.deja.com>
In article <slrn7kh4dk.6qs.sholden@pgrad.cs.usyd.edu.au>,
sholden@cs.usyd.edu.au wrote:
> On Sun, 23 May 1999 16:41:48 GMT, armchair@my-dejanews.com wrote:
> >
> >I did a wc the other day and I am up to 2000 lines (counting comments
> >and blanks and { } etc., of Perl. If it wasn't for this
> > thread I would
> >be well over a 100,000 by now!
>
> So without this thread you would have written code an
> order of magnitude
> or so faster than any measurement of programming rates I
> have ever seen.
> Do you test your code? Do you cut and paste or something to
> increase your
> lines of code / day? Or do you make numbers up?
Are your programming metrics based on international data, or just
figures gathered in Australia? Don't forget that America is taking in
hundreds of thousands of young A grade average programming students from
Asia each year. Not to mention James Gosling, Linus Torvalds and Bjarne
Stroustrup. It's really competitive over here - I'm actually one of the
slow ones. But despite advancing age, I have used my resourcefulness to
raise my lines of code (LOC) output threefold recently. Since you're an
ocean away and not a threat, I can let you in on a part of my new
technique:
# use strict.pm module
use
strict
;
Although in this case, I may have slightly overestimated the amount of
code written were it not for this thread. After all, I am still reading
textbooks (cracked open the imposing 1061 page Perl 5 Complete today and
it's good - whole chapter on contexts in Perl), and of course the
beloved, hallowed and sacred - "the manual".
>
> >As far as my batting average being zero,
> >evidently you didn't realize it was returned as a string, and you
> >handled it like a number. FYI the value was "one thousand percent".
>
> And you evidently don't know about -w.
But it wasn't my code in question. I am, of course, well aware of it,
and quite shocked that zenin didn't use it in this case. Maybe your
stern imprimatur will have him using it all the time.
>
> --
> Sam
>
{
Print
"P";
Print
"e";
Print
"r";
Print
"l";
Print
" ";
Print
"i";
Print
"s";
Print
" ";
Print
"u";
Print
"s";
Print
"e";
Print
"d";
Print
" ";
Print
"i";
Print
"n";
Print
" ";
Print
"O";
Print
"z";
Print
"."
Print
"\n";
}
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Sun, 23 May 1999 22:49:12 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: simple question
Message-Id: <1dsa44l.1u6xpex1lqnyxjN@[207.60.170.90]>
Howie <noone@home.com> wrote:
> noone@home.com (Howie) wrote:
> >simple question, but I can't seem to find a reference to it. How do I convert
> >a string to lowercase?
> >I wanted to do something like this:
> >
> >$email = \l$email;
>
> duh, $email =~ tr/A-Z/a-z/;
> that works obviously.
> thanks anyway.
Even better is:
$email = lc($email);
Which has the advantage of working for different locales.
Another way of doing the same thing is:
$email = "\L$email";
Which is probably what you were getting at in your first post.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 24 May 1999 04:27:55 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: simple question
Message-Id: <3748d54b$0$210@nntp1.ba.best.com>
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
> Howie <noone@home.com> wrote:
>> noone@home.com (Howie) wrote:
>> >simple question, but I can't seem to find a reference to it. How do I convert
>> >a string to lowercase?
> $email = lc($email);
Warning: I am aware that the following question has nothing to do with
Perl. I am also aware that there are users of this group who find such
non-Perl questions objectionable. Such users are free, of course, to
take any action they deem appropriate in response to my callous
disregard for their sensibilities, but I didn't want them to be
confused about whether or not *I* am confused about the first two
points I've stipulated above.
Whew.
Anyway, I'm curious about something: It looks to me like this person is
thinking of downcasing a bunch of email addresses. My understanding of
email addressing conventions is that while it is safe to treat the
hostname part of an email address as case-insensitive, to do so with
the username part (the part to the left of the @, I mean) runs the risk
of rendering a case-sensitive address nondeliverable. I'm curious to
know if this bit of folklore I picked up somewhere is actually true,
and if so, what sorts of systems might display this sort of behavior,
and what people think a reasonable guess would be as to how widespread
such behavior is in the general population of email addresses.
So, is there anyone out there who:
1) knows, or at least has an informed opinion on, the answer, and
2) is actually following this thread, and
3) is willing to violate the subject-matter norms by following up, and
4) hasn't already killfiled me for my off-topic blather?
Thanks.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: Sun, 23 May 1999 21:10:02 -0600
From: Brad Waite <brad@wcubed.net>
Subject: Re: Storing GD::Image
Message-Id: <3748C30A.8BEF4D7B@wcubed.net>
Ron,
$gif is created just fine. I can call the gif method on it with no
problems. The real problem is storing it with Storable::store ( store
(\$gif, 'newimage.gif' ) ). It's not storing the image data, but
apparently only reference info.
-Brad
Ron Savage wrote:
>
> Brad
> See below
>
> Brad Waite wrote in message <37485BC4.B63645E5@wcubed.net>...
> >I'm trying to obtain object persistence between processes and am having
> >a lot of problems. Here's a code snippet:
> >
> >use GD;
> >use Storable;
> >
> >open(FILE, "image.gif");
>
> Is this under Windows?
> Try binmode(...) at this point.
>
> >$gif = newFromGif GD::Image('FILE');
> >close FILE;
> >
> >store( \$gif, 'newimage.gif' );
> >
> >
> >Why is newimage.gif only 30 bytes long? Any suggestions on how to store
> >it? What I'm really trying to do is pass it to another program via
> >shared memory, but I can't even get it to store or freeze correctly.
> >
> >I'm thinking it might be because GD.pm uses the external GD library and
> >therefore the objects aren't native to perl. Am I barking up the wrong
> >tree here?
> >
> >BTW, I can get storable to work fine on scalars and hashes.
> >
> >--
> >Brad Waite
------------------------------
Date: Mon, 24 May 1999 05:29:48 GMT
From: billy_collins@my-dejanews.com
Subject: Transliteration Operator Problem
Message-Id: <7iao4b$c0u$1@nnrp1.deja.com>
Hi guys,
IN a simple script, I am pulling some web content thru the LWP module
and I am trying to change the link tags
<a href="/abc">
to
<a href="http://www.xyz.com/abc">
Now the content that I pull is stored in a variable called $pulled. I
try to TR this variable's value in the following way
$pulled =~ tr/<a href="\/abc/<a href="http:\/\/www.xyz.com\/abc/;
This doesnt work. I believe the problem might be due to the quotes, or
due to the front slashes (though I have escaped them with
backslashes..).
Pls help..the documentation is VERY brief about the TR operator. How do
I change full strings inside TR and not just characters?
Thanks!
Bill
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 23 May 1999 22:51:55 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: "John Hilgedick" <jhilgedi@indiana.edu>
Subject: Re: trouble with constants declared in a module
Message-Id: <m3wvxzrxh0.fsf@joshua.panix.com>
"John Hilgedick" <jhilgedi@indiana.edu> writes:
> package A;
>
> use constant CONST1 => scalar 17;
> use constant CONST2 => 23;
>
> I also have a script with the following lines:
>
> $tmp1 = $A::CONST1;
> $tmp2 = $A::CONST2;
> print "$tmp1 $tmp2";
>
> Which has the effect of printing out "0 0" when I was expecting "17 23".
> Any ideas what I'm doing wrong?
You forgot to RTFM for the constant module. Scalar constants are
implemented as constant suroutines, not as scalars.
#!/usr/bin/perl -w
package Foo;
use constant BAR => 'baz';
package main;
print Foo::BAR, "\n";
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5761
**************************************