[17521] in Perl-Users-Digest
Perl-Users Digest, Issue: 4941 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 21 14:10:54 2000
Date: Tue, 21 Nov 2000 11:10:21 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <974833821-v9-i4941@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 21 Nov 2000 Volume: 9 Number: 4941
Today's topics:
Re: Eurodate mysteries <flavell@mail.cern.ch>
Re: Eurodate mysteries (Tad McClellan)
Re: Eurodate mysteries (Tony L. Svanstrom)
Re: I am sorry for posting this so many times! <kperrier@blkbox.com>
Re: Is "use GD;" part of the standard Perl library ? <RobisonClan@peoplepc.com>
Re: Memory limitation & memory leak <mjcarman@home.com>
Modifying array references <polar@cloud9.net>
Re: Modifying array references (Tad McClellan)
Re: Modifying array references nobull@mail.com
Re: Modifying array references <polar@cloud9.net>
Re: Modifying array references <mjcarman@home.com>
Re: Most easy way to get IP from a local NIC by device mexicanmeatballs@my-deja.com
object function argument? <kshaw@sadmail.com>
Re: object function argument? (Randal L. Schwartz)
Re: object function argument? (Tad McClellan)
Re: object function argument? <kshaw@sadmail.com>
Re: object function argument? nobull@mail.com
OT:Re: Eurodate mysteries coluche@my-deja.com
Re: OT:Re: Eurodate mysteries <mjcarman@home.com>
parse email body <khanrahan@cypresscom.net>
Problem building threaded Perl-5.6 on Solaris-5 <schut@rugth1.phys.rug.nl>
Re: Problem building threaded Perl-5.6 on Solaris-5 (Andy Dougherty)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 21 Nov 2000 15:19:11 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Eurodate mysteries
Message-Id: <Pine.GHP.4.21.0011211505390.25778-100000@hpplus03.cern.ch>
On 21 Nov 2000, Tom Christiansen wrote:
> The answer is quite simple: we here in America in our speech would
> refer to today as "November twenty-first" (and yes, with ordinals
> not with cardinals). Written in full, it might be something like
> "October twenty-fourth, nineteen ninety-three". One simply preserves
> the order of speech when committing to writing: 10/24/93.
I don't think anyone was in any doubt about that. It's still
incompatible with what we do this side of the Pond, and leads to
frequent misunderstandings ("You gave me to understand that this had
been recently updated, but now I see that the last change date is
given as the 11th of Feb???")
> I do mean to imply any moral justification here, merely explanation.
There's a negative missing here...
> A programmer should not feel compelled to present dates to the user
> in the same format as the program stores internally.
No, they should be presented to the user in the format that the reader
understands. So if you're writing for an international audience, you
better choose a human-readable format that is unambiguous to the
international audience (presupposing they can read English at all).
> The ISO date format is nice in many ways. It is not ambiguous, and
> it is easy to parse and sort. But it is also not realistic.
OK, so what's wrong with 21 Nov 2000 (this is what Messy Windows tells
me right now, for example) ?
> people start speaking in ISO, then fine, but until then, you can't
> expect it of them.
That's not the point. You have already admitted that USA-readable
format is potentially ambiguous.
> Never store dates meant to be read by computers in localtime()
> format; at the very least, use gmtime(). Preferably use something
> more readily sortable, like raw time() or the ISO format. But don't
> expect people to read that
This still isn't the point. You need to choose a human-readable format
that isn't doomed to being misunderstood. Dragging-in irrelevances
about machine-internal formats suggests that you haven't any real
arguments to support your use of USA-specific formats, any more than I
would be able to justify using formats that are only comprehensible in
my own country. Well, I just wrote 21/11/2000 in my logbook, but I'm
not asking you to read it: if I were typing it into a web page I would
plan to format it differently.
all the best
------------------------------
Date: Tue, 21 Nov 2000 09:10:41 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Eurodate mysteries
Message-Id: <slrn91l0j1.iak.tadmc@magna.metronet.com>
On Tue, 21 Nov 2000 15:19:11 +0100, Alan J. Flavell
<flavell@mail.cern.ch> wrote:
>On 21 Nov 2000, Tom Christiansen wrote:
>
>> The ISO date format is nice in many ways. It is not ambiguous, and
>> it is easy to parse and sort. But it is also not realistic.
>
>OK, so what's wrong with 21 Nov 2000 (this is what Messy Windows tells
>me right now, for example) ?
In boot camp I was taught that dates were /^\d?\d[A-Z]{3}\d\d$/,
which approximates the above.
(but I expect they have added a couple more \d's to the
end by now, as that was back when the millenium was
"too far away to worry about" (tm).
)
>You have already admitted that USA-readable
>format is potentially ambiguous.
I guess the military doesn't want to start fighting on the wrong day :-)
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 21 Nov 2000 16:07:18 GMT
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Eurodate mysteries
Message-Id: <1ekgi10.1wj2iduxehyk0N%tony@svanstrom.com>
Tom Christiansen <tchrist@perl.com> wrote:
> Continentals are constantly expressing their confusion, surprise, and of
> course, their disapproval, regarding the American habit of writing dates
> with the month before the day, as in "11/21" for today.
When in doubt I usually write "2000y 11m 21d" old-style (using pen and
paper :) and "2000y-11m-21d" when I type it on a computer of some kind
or another.
/Tony
--
/\___/\ Who would you like to read your messages today? /\___/\
\_@ @_/ Protect your privacy: <http://www.pgpi.com/> \_@ @_/
--oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
on the verge of frenzy - i think my mask of sanity is about to slip
---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
\O/ \O/ ©99-00 <http://www.svanstrom.com/?ref=news> \O/ \O/
------------------------------
Date: 21 Nov 2000 12:30:39 -0600
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: I am sorry for posting this so many times!
Message-Id: <C08D24C101E3CB9C.E0E1EED19E3C3B34.6065F3DE1229FFFF@lp.airnews.net>
"Johan M. Ditmar" <johan.ditmar@telia.com> writes:
> Hi all,
>
> I apologize for posting this message so many times. I don´t think it´s my
> fault, it must have something to do with the newsgroup server at my work or
> outlook. I did not do it to get more attention.
Get a better news reader.
Kent
--
This "telephone" has too many shortcomings to be seriously considered as
a means of communication. The device is inherently of no value to us.
-- Western Union internal memo, 1876
------------------------------
Date: Tue, 21 Nov 2000 11:39:16 -0500
From: "Jonathon Robison" <RobisonClan@peoplepc.com>
Subject: Re: Is "use GD;" part of the standard Perl library ?
Message-Id: <t1l9ckcj47dv1f@corp.supernews.com>
No, it is not.
GD.pm is something you will have to download and install. It is written by
Lincoln Stein, so you can find it at lstein.cshl.org. He also wrote CGI.pm
Jon R.
"claudej" <claudej@videotron.ca> wrote in message
news:B63DEB8D.6262%claudej@videotron.ca...
> Is "use GD;" part of the standard Perl library ?
>
> What are the graphical instructions available under Perl 5 ?
>
> filledRectangle ??
>
> Where can I find this information ?
>
> I have 2 books on Perl and CGI and nothing about that subject !!
>
> Thanks
>
> claudej
>
------------------------------
Date: Tue, 21 Nov 2000 09:04:15 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: Memory limitation & memory leak
Message-Id: <3A1A8EEF.8122C17D@home.com>
Jon wrote:
>
> Does anyone here know if there is a limitation to the amount of
> memory Perl can access - assuming that the physical RAM is not
> the limiting factor?.
IIRC, No. Perl will suck up every last byte your system has to offer.
> If I have a localized (my) reference to a hash of hash to an array
> within a function, does all the memory used to build this structure
> gets freed and be made available when Perl exit the function?.
Maybe -- it depends on what you do with that reference. Do you abandon
it or return it to the caller? If something is still using that memory
it won't be freed. Compare:
sub foo {
my $thing = [0 .. 10];
# ...
return;
}
sub bar {
my $thing = [0 .. 10];
# ...
return $thing;
}
(Ignore for the moment the fact that both functions are silly and
useless.) In foo() the array which $thing points to goes out of scope so
its memory will be freed up for reuse. In bar() the reference is
returned to the caller so something outside the function still knows
about the array, it's reference count is non-zero, and it will *not* be
freed upon leaving the sub. It will hang around occupying memory until
everyone has forgotten about it.
-mjc
------------------------------
Date: Tue, 21 Nov 2000 11:52:10 +0000
From: brian <polar@cloud9.net>
Subject: Modifying array references
Message-Id: <3A1A61EA.36F4E9C5@cloud9.net>
I have been trying to find a way to store the several fields for each
element in a hash reference. On the pass thru tha data where it occurs
I have set
push @{$list{$thekey}} , 1
where 1 is the first occurence.
On successive pass where $thekey is true I want to increment the number
of occurences by 1.
I have tried
$incr = @{$list{$thekey}} ;
$incr +=1 ;
@{$list{$thekey}} = $incr ;
but when I access @{$list{$thekey}} it's still set to one.
Thanks for any help and thanks again to those who helped me on previous
posts
Brian
------------------------------
Date: Tue, 21 Nov 2000 11:30:18 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Modifying array references
Message-Id: <slrn91l8oq.ip1.tadmc@magna.metronet.com>
On Tue, 21 Nov 2000 11:52:10 +0000, brian <polar@cloud9.net> wrote:
>I have been trying to find a way to store the several fields for each
>element
I don't see where the "several fields" are. Where are they?
All I see is a count (one field).
A "hash of lists" (HoL, really a hash of references to arrays)
data structure would accomodate that.
But I guess all you really want to do is maintain a count for
each hash key? You can use the scalar hash value to contain
that, no need for a multilevel data structure.
>in a hash reference.
Eh? You do not have any references to a hash in your code.
In the Subject you say 'array ref' and now you are saying
'hash ref'.
If you use random terminology people will have a hard time
understanding what you want.
>On the pass thru tha data where it occurs
>I have set
> push @{$list{$thekey}} , 1
> where 1 is the first occurence.
>On successive pass where $thekey is true
Eh? true?
A hash key is not a Boolean. There is no true and false.
More confusing terminology abuse.
>I want to increment the number
>of occurences by 1.
>I have tried
>
> $incr = @{$list{$thekey}} ;
What does the name of an array return when you use it in
scalar context like you have there?
It returns _the number of elements_ in the array, it does not
return a value from the array.
> $incr +=1 ;
> @{$list{$thekey}} = $incr ;
Sincd you are assigning to the entire array (you can tell you are
because of the @ sign), all previous elements in the array are
discarded, then you make the first element have a value one
greater than the number of elements being discarded.
You don't need to be copying it around to temporary variables either.
If you want to access a scalar (like a value in an array) you
use the dollar sign.
If you want to access an entire array you use the at sign.
>but when I access @{$list{$thekey}} it's still set to one.
How do you access it?
Context matters 'cause the above has different semantics in
list context and scalar context.
I do not see the need for references anywhere in your problem
description.
Why do you think you need references just to count things?
What is it that you really are trying to accomplish?
Got some sample input and output for what you would like to
see your program do?
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 21 Nov 2000 17:40:09 +0000
From: nobull@mail.com
Subject: Re: Modifying array references
Message-Id: <u9itph8bra.fsf@wcl-l.bham.ac.uk>
brian <polar@cloud9.net> writes carelessly:
> Subject: Modifying array references
I assume when you say "modifying array references" you are trying to
say "modifying arrays through references".
> I have been trying to find a way to store the several fields for each
> element in a hash reference.
I assume that when you say "the several fields" you are trying to say
"multiple values".
I assume that when you say "a hash reference" you are trying to say "a
hash".
So I'm going to work on the assumption that you are trying to say "I
have been trying to find a way to store several values for each
element in a hash."
If this is not what you were trying to say can you please tell us what
you were trying to say.
> On the pass thru tha data where it occurs
What is "the data"? What is "it"? What do you mean by "occurs"?
> I have set
> push @{$list{$thekey}} , 1
> where 1 is the first occurence.
That looks OK. %list is a hash containing array references.
> On successive pass where $thekey is true
What you you mean by "$thekey is true"?
> I want to increment the number of occurences by 1.
What is "the number of occurences"? Do you mean the number of
elements in the array? I think you are probably thinking about things
inside out. It is possible in Perl to explicity increment the number
of elements in an array ( $#{array}++) but it's more natural just to
push more elements onto the array (just like you did with the first)
and let the number of elements look after itself.
> I have tried
>
> $incr = @{$list{$thekey}} ;
> $incr +=1 ;
> @{$list{$thekey}} = $incr ;
@{$list{$thekey}} its the array, not the number of elements in the
array. If you use the array in a scalar context then you get the
number of elements. If you use an array on the LHS of an assignement
you replace the contentents of the array with the list that appears on
the RHS of the assignement.
So what the above code does is replace the contents of the array with
a new list with a single element that is a number one more than the
number of elements that was in the old array.
So if @{$list{$thekey}} contained ('foo','bar') before it would
contain (3) afterwards.
> but when I access @{$list{$thekey}} it's still set to one.
It doesn not make sense to say an array is "set to one". It's an
array for $DEITY's sake! When you say "set to one" I suspect you are
trying to say "evaluates in a scalar context to one" (i.e. contains
one element). Of course it is also possible that you are trying to
say "contains a single element which has the value one". It's not
realy clear.
Can you tell use what is it you are actually trying to achieve? From
what you've described you seem to be trying to use the number of
elements in an array as a counter and not care about what the elements
actually are! Why not simply use a scalar containing a number?
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Tue, 21 Nov 2000 13:48:17 +0000
From: brian <polar@cloud9.net>
Subject: Re: Modifying array references
Message-Id: <3A1A7D20.9FEEB216@cloud9.net>
Sorry - I posted the problem in haste ans was unclear.
Basically I am using
push @{$list{$thekey}} , $firstdate, $lastdate, $numoccur
to set each key on the first occurrence a conditional test is true.
I am trying to the modify $lastdate and $numoccur on successive passes if
the conditional test for that key value is found to be true.
For example I can read
abc 19990202 19990202 1
def 20000302 20000302 1
xyz 19970402 11970402 1
I then used
@xyz = @{$list{$thekey}}
$number_increment = pop ( @xyz )
$new_last_date = pop ( @xyz )
$number_increment += 1
$new_last_date = $current_date ## set to todays date earlier
push @xyz , $number_increment
push @xyz $new_last_date
@{$list{$thekey}}= @xyz
this works and places the key and new values bcak in @{$list{$thekey}} but
when I
loop thru at the end of the file run there are numerous occurrences of the
keys - values
foreach $kevalue ( keys %list )
{
print "$keyvalue"
my @fields = @{$list{$keyvalues}}
print join ', ', @fields
}
assuming abc occurred 7 times, def 3 and xyz 1 - at the end of the run
I get
abc 19990202 19990217 7
def 20000302 20000311 3
xyz 19970402 11970402 1
abc 19990202 19990217 7
def 20000302 20000311 3
abc 19990202 19990217 7
def 20000302 20000311 3
Can anyone tell me why this prints out multiple times when there is only (
hopefully ) one copy of each key.
Brian
------------------------------
Date: Tue, 21 Nov 2000 12:04:41 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: Modifying array references
Message-Id: <3A1AB939.94BBD41F@home.com>
brian wrote:
>
> I have been trying to find a way to store the several fields for
> each element in a hash reference. On the pass thru tha data
> where it occurs I have set
> push @{$list{$thekey}} , 1
> where 1 is the first occurence.
Okay, so you now have something that looks like this:
%list = (
$thekey => [1],
# other key/value pairs...
);
> On successive pass where $thekey is true I want to increment
> the number of occurences by 1.
Note: unless $thekey = undef, 0, or '' it will be boolean true. Are you
sure that's what you mean to say?
> I have tried
> $incr = @{$list{$thekey}} ;
That dereferences $list{$thekey} as an array, then interprets it in
scalar context because of the left side of the equation (which means it
returns the length of the list) and assigns that value to $incr.
> $incr +=1 ;
Adds one to $incr. Usually written more concisely as $incr++
> @{$list{$thekey}} = $incr ;
Dereferences $list{$thekey} as an array and sets the whole thing equal
to $incr. (Which, as you'll recall, now contains the *length* of the
list + 1) Perl will try to make sense out of assigning a scalar to a
list by casting $incr into ($incr).
> but when I access @{$list{$thekey}} it's still set to one.
Well, if you're using that expression in a scalar context, that's what
you'll get, because that's the length of the list, *not* what it holds!
If you want the value of that first element, use $list{$thekey}[0].
Your three buggy lines can be replaced with this:
$list{$thekey}[0]++;
which will do what you're asking, but why are you storing array refs at
all? Are there other values after the 1? If that's the only thing you're
storing, just stick a scalar value in there and forget all this array
ref business:
$list{$thekey}++;
You don't even have to initialize this -- Perl will DWYM it such that
the first time you say this, it will create $list{$thekey} and set it to
1. After that it will increment it.
And if you really do want a list there, I suggest you go back and reread
perlref to understand reference syntax, and perldata as well to get down
the difference between @array in scalar and list contexts.
-mjc
------------------------------
Date: Tue, 21 Nov 2000 17:27:02 GMT
From: mexicanmeatballs@my-deja.com
Subject: Re: Most easy way to get IP from a local NIC by device name (eth0,eth1...)
Message-Id: <8veb8s$qb1$1@nnrp1.deja.com>
In article <slrn91guqi.q2.mgjv@verbruggen.comdyn.com.au>,
mgjv@tradingpost.com.au wrote:
> On Mon, 20 Nov 2000 01:00:27 GMT,
> Mats Pettersson <mats.pettersson@falukuriren.se> wrote:
> > Hi!
> >
> > I'm trying to get the IP from one of my NICs (eth1) from perl
(running on
> > FreeBSD).
> >
> > I'm using DHCP so the IP may change from time to time and when my
script run
> > i need to know what the adress is.
> >
> > Is there any other way than extracting it from nestat or something
like
> > that?
>
> No portable way. The best thing to do is just call ifconfig. You might
> want to wrap the call in some sub, so that you can easily add to
> it/change it for other platforms.
>
Well, I don't know how portable it is, but it works on Linux and
everything seems fairly standard in it:
#!/usr/bin/perl -w
use strict;
use Socket;
my $proto = getprotobyname("udp");
socket(SOCKET, PF_INET, SOCK_DGRAM, $proto);
connect(SOCKET, sockaddr_in(0, inet_aton("27.0.0.1")));
my ($port, @addr) = unpack_sockaddr_in(getsockname(SOCKET));
my $ip = inet_ntoa($addr[0]);
print "$ip\n";
If you have multiple adapters (Hence multiple addresses) you can get
the address of the interface for a specific network by supplying a host
address for that network (not necessarily an actual host) in place of
the '27.0.0.1'.
--
Jon
perl -e 'print map {chr(ord($_)-3)} split //, "MrqEdunhuClqdph1frp";'
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 21 Nov 2000 08:17:21 -0800
From: Stanley Sporkin <kshaw@sadmail.com>
Subject: object function argument?
Message-Id: <uy9ydpaem.fsf@niku.com>
I'm just learning about oo in perl. If I have:
sub blah {
my $ob = shift;
my $obob = shift;
$ob->some_method;
$obob->some_other_method;
}
This doesn't work, because perl doesn't know what class the objects
are instances of. How can I pass an object as an argument?
------------------------------
Date: 21 Nov 2000 09:03:36 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: object function argument?
Message-Id: <m1wvdx2r6f.fsf@halfdome.holdit.com>
>>>>> "Stanley" == Stanley Sporkin <kshaw@sadmail.com> writes:
Stanley> I'm just learning about oo in perl. If I have:
Stanley> sub blah {
Stanley> my $ob = shift;
Stanley> my $obob = shift;
Stanley> $ob->some_method;
Stanley> $obob->some_other_method;
Stanley> }
Stanley> This doesn't work, because perl doesn't know what class the objects
Stanley> are instances of. How can I pass an object as an argument?
[sorry for first post... I misfired on GNUS keys]
This should work. The "class" of an object is buried in the object.
What did you try? How do you know it didn't work?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 21 Nov 2000 11:37:41 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: object function argument?
Message-Id: <slrn91l96l.ip1.tadmc@magna.metronet.com>
On 21 Nov 2000 08:17:21 -0800, Stanley Sporkin <kshaw@sadmail.com> wrote:
>I'm just learning about oo in perl. If I have:
>
>sub blah {
> my $ob = shift;
> my $obob = shift;
> $ob->some_method;
> $obob->some_other_method;
>}
>
>This doesn't work,
^^^^^^^^^^^^
The most classic and worthless of diagnostics.
What does "doesn't work" mean?
That is, what symptoms (messages, output...) do you see to
suggest that it is not working?
>because perl doesn't know what class the objects
>are instances of.
If you've done it right then perl _will_ know what class
the objects are in.
Have $ob and $obob been bless()ed somewhere?
>How can I pass an object as an argument?
In the absense of further information (like the code that created
the objects): Like you have it there.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 21 Nov 2000 09:52:36 -0800
From: Stanley Sporkin <kshaw@sadmail.com>
Subject: Re: object function argument?
Message-Id: <ur945p5zv.fsf@niku.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
> >>>>> "Stanley" == Stanley Sporkin <kshaw@sadmail.com> writes:
>
> Stanley> This doesn't work, because perl doesn't know what class the objects
> Stanley> are instances of. How can I pass an object as an argument?
>
> [sorry for first post... I misfired on GNUS keys]
>
> This should work. The "class" of an object is buried in the object.
> What did you try? How do you know it didn't work?
Oops. It does work, and I can't reproduce the problem I was
having... Sorry to waste bandwidth (D'oh, I'm doing that now).
------------------------------
Date: 21 Nov 2000 18:45:08 +0000
From: nobull@mail.com
Subject: Re: object function argument?
Message-Id: <u9g0kl88qz.fsf@wcl-l.bham.ac.uk>
Stanley Sporkin <kshaw@sadmail.com> writes:
> I'm just learning about oo in perl. If I have:
>
> sub blah {
> my $ob = shift;
> my $obob = shift;
> $ob->some_method;
> $obob->some_other_method;
> }
>
> This doesn't work, because perl doesn't know what class the objects
> are instances of.
It is much more likely that Perl knows and it is you who are labouring
under a misconception about what class of object (if any) the
arguments you are passing to blah() are instances of.
> How can I pass an object as an argument?
Just do it.
When posting to a programming newsgroup for help always post a minimal
but _complete_ program that compiles and runs with all the saftey
features of the language enabled and which illusstrates the behaviour
you don't understand.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Tue, 21 Nov 2000 14:51:59 GMT
From: coluche@my-deja.com
Subject: OT:Re: Eurodate mysteries
Message-Id: <8ve26c$hs9$1@nnrp1.deja.com>
In article <3a1a7a9a@cs.colorado.edu>,
tchrist@perl.com (Tom Christiansen) wrote:
> In article <qvo91tsak6ggsnfgrqfpmipkkg8e6he201@4ax.com>,
> Bart Lateur <bart.lateur@skynet.be> wrote:
> >># Note my use of European Date format and 4 digit year - just to be
> >>different
> >
> >Not just that. In Europe, we have the habit of putting the day first,
> >month second.
>
> Continentals are constantly expressing their confusion, surprise,
> and of course, their disapproval, regarding the American habit of
> writing dates with the month before the day, as in "11/21" for
> today. Having spent five of my last seven weeks traipsing around
> the GMT+0 and GMT+1 timezones as something of an itinerant Perl
> scholar, I've been called upon to justify this habit time and time
> again.
>
> The answer is quite simple: we here in America in our speech would
> refer to today as "November twenty-first" (and yes, with ordinals
> not with cardinals). Written in full, it might be something like
> "October twenty-fourth, nineteen ninety-three". One simply preserves
> the order of speech when committing to writing: 10/24/93.
>
> While there are alternate ways of speaking of the date, this first
> of these here is by far the most common:
>
> October twenty-fourth, nineteen ninety-three
>
> October twenty-fourth
>
> October the twenty-fourth, nineteen ninety-three
>
> The twenty-fourth of October, nineteen ninety-three
>
> The twenty-fourth day of October, nineteen hundred and ninety-
three
Greets,
What was the title of that movie again, Born on July fourth or Born
on the 4th of July?
Anyways, this reminds me of some Information Theory lectures I took
aaages ago. For the day of the week, there are seven possibilities
whereas for the month of the year there are 12 possibilities. Does it
not make sense to start with the most information bearing element? As
for the year, well, I guess it's information content is 1 in most
context.
Well, that's just my rant after being forced to adopt a date system
that colleagues in our US parent company would understand :<
--
Coluche ;-)
>
> I do mean to imply any moral justification here, merely explanation.
>
> A programmer should not feel compelled to present dates to the user
> in the same format as the program stores internally. After all,
> users don't like 974813192 much. :-)
>
[snip]
>
> --tom
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 21 Nov 2000 10:08:10 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: OT:Re: Eurodate mysteries
Message-Id: <3A1A9DEA.7853393D@home.com>
coluche@my-deja.com wrote:
>
> tchrist@perl.com (Tom Christiansen) wrote:
>
> > While there are alternate ways of speaking of the date, this first
> > of these here [in the USA] is by far the most common:
> >
> > October twenty-fourth, nineteen ninety-three
> >
> > October twenty-fourth
> >
> > October the twenty-fourth, nineteen ninety-three
> >
> > The twenty-fourth of October, nineteen ninety-three
> >
> > The twenty-fourth day of October, nineteen hundred and ninety-
> > three
>
> What was the title of that movie again, Born on July fourth or Born
> on the 4th of July?
Hey! We Americans reserve the right to be inconsistent. :) It is, of
course, a bit of subtle irony that we chose to use the "European" style
date to speak of a holiday celebrating American independance from
Europe, when we use our own for most everything else.
One thing Tom didn't mention is the level of formality, which is roughly
opposite to the ordering of his list. We'd say "October twenty-fourth"
in casual conversation, but write "The twenty-fourth day of October" on
an invitation to a black-tie affair. Maybe that's why it's "The Fourth
of July."
> Anyways, this reminds me of some Information Theory lectures I took
> aaages ago. For the day of the week, there are seven possibilities
> whereas for the month of the year there are 12 possibilities. Does it
> not make sense to start with the most information bearing element? As
> for the year, well, I guess it's information content is 1 in most
> context.
Seems logical to me, but one could also argue that we should specify
dates in YYYY/MM/DD format, as that most closely represents our
numbering system.
-mjc
------------------------------
Date: Tue, 21 Nov 2000 13:58:52 -0500
From: Kevin Hanrahan <khanrahan@cypresscom.net>
Subject: parse email body
Message-Id: <3A1AC5EC.190B8FDE@cypresscom.net>
can anyone show me how to parse out just the body of an email message
and save it as a variable or pipe it to another program?
------------------------------
Date: 21 Nov 2000 14:05:01 GMT
From: Koos Schut <schut@rugth1.phys.rug.nl>
Subject: Problem building threaded Perl-5.6 on Solaris-5
Message-Id: <8vdved$5r6$1@info.service.rug.nl>
Hi all,
I am trying to build perl-5.6.0 (build 620) with threadin.
I ran the configure-stuff:
sh Configure (and choose for threaded perl)
sh Configure -Dcc=gcc -Dusethreads -Duse5005threads
sh Configure -Dcc=gcc -Duse5005threads
sh Configure -Dcc=gcc -Dusethreads
--
and run make.
All give the same problem:
------ start quote ------
....lines deleted
`sh cflags libperl.a perlio.o` perlio.c
CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -O
`sh cflags libperl.a perlapi.o` perlapi.c
CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -O
rm -f libperl.a
/usr/ccs/bin/ar rcu libperl.a perl.o malloc.o gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o hv.o av.o run.o pp_hot.o
sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o p
erlapi.o
gcc -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a -lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc -lcrypt -lsec
ld: fatal: symbol `Perl_newCONSTSUB' is multiply defined:
(file opmini.o and file libperl.a(op.o));
ld: fatal: symbol `Perl_newANONHASH' is multiply defined:
(file opmini.o and file libperl.a(op.o));
`sh cflags libperl.a perlio.o` perlio.c
CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -O
`sh cflags libperl.a perlapi.o` perlapi.c
CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -O
rm -f libperl.a
/usr/ccs/bin/ar rcu libperl.a perl.o malloc.o gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o hv.o av.o run.o pp_hot.o
sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o p
erlapi.o
gcc -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a -lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc -lcrypt -lsec
ld: fatal: symbol `Perl_newCONSTSUB' is multiply defined:
(file opmini.o and file libperl.a(op.o));
ld: fatal: symbol `Perl_newANONHASH' is multiply defined:
(file opmini.o and file libperl.a(op.o));
...... lines deleted (lots of multiply defined in opmini.o and libperl.a)
------end quote -----
It seems that opmini.o and libperl.a both define lots of identical
things. I can build this software *without* threading without
problems. Unfortunately I need a threaded perl.
DOes anyone have a clue of how to deal with this?
Mazzel, cheers, bye, tabe, moi, tot ziens, have a nice day,
Koos
__________________________to be Y999T-compliant_____________________
JJ Schut | e-mail: schut@phys.rug.nl |
Institute for Theoretical Physics | Phone: +31 15 2566804 |
University of Groningen | Phone: +31 70 3116092 |
P.O. Box 800 | Fax: +31 70 3112133 |
9700 AV Groningen, The Netherlands. | Yell: Very, Very loud |
---------------------- use: yyyyyyyyyyyyyyy/mm/dd-------------------
------------------------------
Date: Tue, 21 Nov 2000 17:39:12 -0000
From: doughera@maxwell.phys.lafayette.edu (Andy Dougherty)
Subject: Re: Problem building threaded Perl-5.6 on Solaris-5
Message-Id: <slrn91lcrt.aah.doughera@maxwell.phys.lafayette.edu>
In article <8vdved$5r6$1@info.service.rug.nl>, Koos Schut wrote:
>sh Configure -Dcc=gcc -Dusethreads -Duse5005threads
[ . . . ]
>gcc -L/usr/local/lib -o miniperl \
> miniperlmain.o opmini.o libperl.a -lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc -lcrypt -lsec
>ld: fatal: symbol `Perl_newCONSTSUB' is multiply defined:
> (file opmini.o and file libperl.a(op.o));
[more similar errors omitted]
>DOes anyone have a clue of how to deal with this?
The problem is that your build directory still contains a stale
opmini.o from a previous build. Although this should be handled
automatically, it isn't in 5.6.0 (though it is fixed in the
current development track). The most reliable solution is to follow
the advice in the INSTALL file:
=head1 Start with a Fresh Distribution
If you have built perl before, you should clean out the build
directory with the command
make distclean
This should solve your problem.
Hope this helps.
--
Andy Dougherty doughera@lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4941
**************************************