[31885] in Perl-Users-Digest
Perl-Users Digest, Issue: 3148 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 27 14:09:43 2010
Date: Mon, 27 Sep 2010 11:09:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 27 Sep 2010 Volume: 11 Number: 3148
Today's topics:
Ambiguous range in transliteration operator at <founder@pege.org>
Re: Ambiguous range in transliteration operator at <tadmc@seesig.invalid>
Re: complex problem <RedGrittyBrick@spamweary.invalid>
Re: complex problem sln@netherlands.com
Re: Long script "just stops" sometime <whynot@pozharski.name>
Re: Need Regex for phone number <justin.1007@purestblue.com>
Re: printing the result of a procedure call <hhr-m@web.de>
Re: printing the result of a procedure call <NoSpamPleaseButThisIsValid3@gmx.net>
Re: printing the result of a procedure call <jurgenex@hotmail.com>
Re: printing the result of a procedure call <hhr-m@web.de>
Re: printing the result of a procedure call <uri@StemSystems.com>
Re: reduce-tagged (was Re: toy list processing problem: <mirko.vukovic@gmail.com>
Re: reduce-tagged (was Re: toy list processing problem: <mirko.vukovic@gmail.com>
reduced-tagged (was Re: toy list processing problem: co <mirko.vukovic@gmail.com>
Re: why does this happen? <mvdwege@mail.com>
Re: why does this happen? <hadronquark@gmail.com>
Re: why does this happen? <mvdwege@mail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 27 Sep 2010 10:58:21 +0200
From: =?ISO-8859-1?Q?Roland_M=F6sl?= <founder@pege.org>
Subject: Ambiguous range in transliteration operator at
Message-Id: <i7pmbe$7ed$1@news.albasani.net>
Just installed ActiveState Perl 5.12
Built 1022
What worked long years,
creates suddenly
Ambiguous range in transliteration operator at
$mask =~ y/0123456789/----------/;
--
Roland Mösl - PEGE - http://www.pege.org
Planetary Engineering Group Earth
------------------------------
Date: Mon, 27 Sep 2010 08:46:48 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Ambiguous range in transliteration operator at
Message-Id: <slrnia183i.uoh.tadmc@tadbox.sbcglobal.net>
Roland Mösl <founder@pege.org> wrote:
> Ambiguous range in transliteration operator at
Did you look up the message in perldiag.pod?
> $mask =~ y/0123456789/----------/;
perldoc perlop
says:
if the REPLACEMENTLIST is shorter than the SEARCHLIST, the
final character is replicated till it is long enough
so you can just do:
y/0123456789/-/;
--
Rest In Peace:
Jonah McClellan gave his life for his country in a
helicopter crash in Afghanistan on September 21,2010.
Please pray for his wife and three children.
------------------------------
Date: Mon, 27 Sep 2010 10:28:43 +0100
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: complex problem
Message-Id: <4ca063cb$0$12167$fa0fcedb@news.zen.co.uk>
On 26/09/2010 19:33, Xho Jingleheimerschmidt wrote:
> Tad McClellan wrote:
>> ela <ela@yantai.org> wrote:
>>
>>> Subject: complex problem
>>
>>
>> Please put the subject of your article in the Subject of your article.
>>
>
> If he attempted to do that, he would be accused to committing the XYZ
> problem.
>
If I were the OP, I'd view being informed of both as a boon.
P.S. Thanks for drawing my attention to the XYZ problem†, previously I'd
only known of the XY problem.
†http://www.perlmonks.org/index.pl?node_id=6672
--
RGB
------------------------------
Date: Mon, 27 Sep 2010 09:00:43 -0700
From: sln@netherlands.com
Subject: Re: complex problem
Message-Id: <kif1a6l4s9k0k1rgo5d696nuj53vuk9jp4@4ax.com>
On Sun, 26 Sep 2010 19:38:06 -0700, "ela" <ela@yantai.org> wrote:
>
>"Xho Jingleheimerschmidt" <xhoster@gmail.com> wrote in message
>news:4c9ee57d$0$20963$ed362ca5@nr5-q3a.newsreader.com...
>
>> Sorry, but it seems self-evident to me, so I don't see how I can explain
>> it. Maybe I'm not correctly apprehending what the purpose is that you
>> have in mind.
>>
>> Xho
>
>Let me give a simple example:
>
>File 1
>ID character
>1 A
>2 T
>3 G
>
>File 2
>ID character
>1 A
>3 T
>
>File 3
>ID character
>2 A
>3 T
>4 C
>
>processed result
>ID File 1 character File 2 character File 3 character
>1 A A n/a
>2 T n/a A
>3 G T T
>4 n/a n/a C
>
>
This can be done more than one way.
$data[ $id ][ file number ] id as index, depends on id being small and integer
or
$data{ $id }[ file number ] id as hash key, the keys are not sorted
-sln
--------------
use strict;
use warnings;
my $f1 =<<EO1;
1 A
2 T
3 G
EO1
my $f2 =<<EO2;
1 A
3 T
EO2
my $f3 =<<EO3;
2 A
3 T
4 C
EO3
my %data;
my $filecount = 0;
# Put file list in the column order
# of the output wanted
# --------------------------
for my $file (\$f1, \$f2, \$f3)
{
open my $fh, '<', $file or die "can't open $file: @!";
while ( defined (my $line = <$fh>) )
{
my ($id, $char) = parseline ($line);
next unless defined $id;
$data{ $id }[ $filecount + 1 ] = $char;
unless (defined $data{ $id }[ 0 ]) {
$data{ $id }[ 0 ] = $id;
}
}
close $fh;
++$filecount;
}
for my $id (sort keys %data)
{
for my $count (0 .. $filecount) {
$data{ $id }[ $count ] = 'n/a'
unless defined ($data{ $id }[ $count ]);
}
print " '@{$data{ $id }}'\n";
}
sub parseline
{
return $_[0] =~ /\s*(\S+)\s+(\S+)\s*/;
}
------------------------------
Date: Mon, 27 Sep 2010 10:24:08 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: Long script "just stops" sometime
Message-Id: <slrnia0hkn.set.whynot@orphan.zombinet>
with <m635n7-9og1.ln1@osiris.mauzo.dyndns.org> Ben Morrow wrote:
> Quoth Xho Jingleheimerschmidt <xhoster@gmail.com>:
>>
>> Unfortunately, if you use strace "-p" option to attach to an
>> already-running process, if often doesn't show you what call the process
>> was waiting on at the time of the attachment. You would have to start
>> stracing the process from the beginning, which is inconvenient if the
>> situation at question only happens occasionally.
>
> You can find out what call the process is currently blocking in with ps.
I've just checked (linux, 2.6.30, Debian). Neither '-n
/boot/System.map-2.6.30*' nor '-n /proc/*/wchan' helps 'ps' to find
syscall. 'ps' fails with its default routine either. Thus the output
for 'WCHAN' column is always either '-' or '?'. I remember, it was
there. Now it's missing.
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Mon, 27 Sep 2010 15:04:43 +0100
From: Justin C <justin.1007@purestblue.com>
Subject: Re: Need Regex for phone number
Message-Id: <rsk6n7-oqe.ln1@zem.masonsmusic.co.uk>
On 2010-09-23, lotug <ernesto@ernestoreyes.com> wrote:
> I need Regex to indentify 3108222400 phone number.
You could try:
if ($_ =~ /3108222400/) {
.
.
.
}
or did you have something else in mind?
Justin.
--
Justin C, by the sea.
------------------------------
Date: Mon, 27 Sep 2010 09:30:55 +0200
From: Helmut Richter <hhr-m@web.de>
Subject: Re: printing the result of a procedure call
Message-Id: <Pine.LNX.4.64.1009270923230.4601@lxhri01.ws.lrz.de>
On Sun, 26 Sep 2010, wrote:
> But in the second case you didn't call proc().
>
> Why aren't you using strict and warnings? If you had used strict and
> warnings then perl would have told you what's wrong.
That's correct -- I should have done that.
> Solutions:
> a: predeclare sub proc;
> b: use
> print (proc(1));
> instead of
> print (proc (1));
c: use &proc. This is how I did it for more than a decade, and it works
with a blank after the procedure name as well as without. Now, for
whatever reason, I find it nicer without the &, and I simply did not
expect that it would have so much of an effect in the tiny fraction of
cases where it matters -- probably *only* with print and similar commands.
(In the meantime, it has become fashionable not to write parentheses at
all, but it might take me another decade to get used to it enough to be
able to see where the parameter list ends.)
Thanks to all who responded!
--
Helmut Richter
------------------------------
Date: Mon, 27 Sep 2010 09:49:32 +0200
From: Wolf Behrenhoff <NoSpamPleaseButThisIsValid3@gmx.net>
Subject: Re: printing the result of a procedure call
Message-Id: <4ca04c8c$0$7664$9b4e6d93@newsspool1.arcor-online.net>
On 27.09.2010 09:30, Helmut Richter wrote:
> c: use &proc. This is how I did it for more than a decade, and it works
> with a blank after the procedure name as well as without. Now, for
> whatever reason, I find it nicer without the &, and I simply did not
> expect that it would have so much of an effect in the tiny fraction of
> cases where it matters -- probably *only* with print and similar commands.
>
> (In the meantime, it has become fashionable not to write parentheses at
> all, but it might take me another decade to get used to it enough to be
> able to see where the parameter list ends.)
It is very bad style to use &proc - unless you know what you're doing.
For one thing, the & overrides prototypes. As a second thing, as you
mention leaving out parentheses: note that proc(); and &proc; do
different things. The first form passes an empty argument list, the
second form passes @_! (or maybe better: the first form clears @_ for
the sub proc while &proc does not change @_).
Don't use &proc if you can use proc() instead.
Wolf
------------------------------
Date: Mon, 27 Sep 2010 05:02:52 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: printing the result of a procedure call
Message-Id: <5p11a6dh1ngvf3l6f41vo2fp03joo75qeu@4ax.com>
Helmut Richter <hhr-m@web.de> wrote:
>On Sun, 26 Sep 2010, wrote:
>
>> But in the second case you didn't call proc().
>>
>> Why aren't you using strict and warnings? If you had used strict and
>> warnings then perl would have told you what's wrong.
>
>That's correct -- I should have done that.
>
>> Solutions:
>> a: predeclare sub proc;
>> b: use
>> print (proc(1));
>> instead of
>> print (proc (1));
>
>c: use &proc.
Hmmmm, no. That would have a quite different semantic.
And if you don't know what that different semantic is then you don't
want to use &proc.
It is a very rare case that &proc is actually useful.
jue
------------------------------
Date: Mon, 27 Sep 2010 16:51:27 +0200
From: Helmut Richter <hhr-m@web.de>
Subject: Re: printing the result of a procedure call
Message-Id: <Pine.LNX.4.64.1009271638230.4601@lxhri01.ws.lrz.de>
On Mon, 27 Sep 2010, Wolf Behrenhoff wrote:
> On 27.09.2010 09:30, Helmut Richter wrote:
> > c: use &proc. This is how I did it for more than a decade, and it works
> > with a blank after the procedure name as well as without. Now, for
> > whatever reason, I find it nicer without the &, and I simply did not
> > expect that it would have so much of an effect in the tiny fraction of
> > cases where it matters -- probably *only* with print and similar commands.
> >
> > (In the meantime, it has become fashionable not to write parentheses at
> > all, but it might take me another decade to get used to it enough to be
> > able to see where the parameter list ends.)
>
> It is very bad style to use &proc - unless you know what you're doing.
> For one thing, the & overrides prototypes. As a second thing, as you
> mention leaving out parentheses: note that proc(); and &proc; do
> different things. The first form passes an empty argument list, the
> second form passes @_! (or maybe better: the first form clears @_ for
> the sub proc while &proc does not change @_).
>
> Don't use &proc if you can use proc() instead.
I will in the future. But when I learnt perl, &proc was the standard way
of writing procedure calls -- see the camel book, edition March 1992.
Well, the oldest of my scripts I still use on a regular basis is from 2001
-- I have no idea what was then the preferred way of writing procedure
calls. (That's how you discover you're getting real old.) By and large,
language changes have been upward compatible over time, though.
My problem was not language change but ambiguity: what I had written
allowed two different ways of syntactic decomposition, of which I only saw
one. Even if I had seen both, I would not have been able to tell which of
them the compiler/interpreter would assume to be the correct one, and I
see no way to determine that from any language description I have. So "use
warnings" is indeed the right (the only?) way to resolve the ambiguity.
--
Helmut Richter
------------------------------
Date: Mon, 27 Sep 2010 11:33:36 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: printing the result of a procedure call
Message-Id: <87zkv3qjzj.fsf@quad.sysarch.com>
>>>>> "HR" == Helmut Richter <hhr-m@web.de> writes:
>> Don't use &proc if you can use proc() instead.
HR> I will in the future. But when I learnt perl, &proc was the
HR> standard way of writing procedure calls -- see the camel book,
HR> edition March 1992. Well, the oldest of my scripts I still use on
HR> a regular basis is from 2001
and perl5 has been out since 1993 with 5.004 (first decent version) out
in 1997. perl4 required the &foo call style and perl5 didn't. so you
have been way out of touch thinking & was needed or normal.
HR> -- I have no idea what was then the preferred way of writing
HR> procedure calls. (That's how you discover you're getting real
HR> old.) By and large, language changes have been upward compatible
HR> over time, though.
perl4 was very compatible with perl5 but that doesn't mean newer ways
didn't obsolete older one. real references made using typeglobs and/or
symbolic references obsolete. calling subs with foo() made &foo
obsolete.
HR> My problem was not language change but ambiguity: what I had
HR> written allowed two different ways of syntactic decomposition, of
HR> which I only saw one. Even if I had seen both, I would not have
HR> been able to tell which of them the compiler/interpreter would
HR> assume to be the correct one, and I see no way to determine that
HR> from any language description I have. So "use warnings" is indeed
HR> the right (the only?) way to resolve the ambiguity.
where have you been for 13 years? you never saw foo() in any perl code
since then? on cpan? cow-orkers? web scripts? it make little sense to
keep programming in a language for 15+ years and not knowing about any
changes in it.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Mon, 27 Sep 2010 08:40:45 -0700 (PDT)
From: Mirko <mirko.vukovic@gmail.com>
Subject: Re: reduce-tagged (was Re: toy list processing problem: collect similar terms)
Message-Id: <99efd0f5-36cd-496e-8941-9e1ba1227929@w4g2000vbh.googlegroups.com>
On Sep 27, 11:18=A0am, Mirko <mirko.vuko...@gmail.com> wrote:
> On Sep 26, 12:05=A0am, Xah Lee <xah...@gmail.com> wrote:
>
> I am hijacking the following post and driving it to Cuba (the Monthy
> Python fans will know what I refer to). =A0I want to create a `reduce'-
> like function that can handle similar problems.
>
> Xah said:
>
>
>
> > here's a interesting toy list processing problem.
>
> > I have a list of lists, where each sublist is labelled by
> > a number. I need to collect together the contents of all sublists
> > sharing
> > the same label. So if I have the list
>
> > ((0 a b) (1 c d) (2 e f) (3 g h) (1 i j) (2 k l) (4 m n) (2 o p) (4 q
> > r) (5 s t))
>
> > where the first element of each sublist is the label, I need to
> > produce:
>
> > output:
> > ((a b) (c d i j) (e f k l o p) (g h) (m n q r) (s t))
>
> > stuffed deleted.
>
> Here is my Common Lisp (and I only care about Common Lisp answers)
> attempt to create a `reduce'-like function to handle this kind of a
> problem (you will see that I am still struggling with the code and the
> documentation).
>
> (defun reduce-tagged (function sequence &key
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(key-tag #'first)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(key-datum #'rest))
> =A0 "Use a binary operation, `function' to combine a sequence of tagged
> elements. =A0like-tagged elements are `reduce'd according to `function'
> and returned in a list ...
>
> `sequence' is a sequence of tagged elements. =A0reduce-m will reduce
> like-tagged-elements.
>
> If `key-tag' is supplied it is used to extract the element tag. =A0If
> `key-tag' is not supplied, the function `first' is used.
>
> If `key-datum' is supplied, it is used to extract the element datum.
> If `key-datum' is not supplied, the function `rest' is used.
>
> "
> =A0 (let ((hash (make-hash-table)))
> =A0 =A0 (dolist (datum sequence)
> =A0 =A0 =A0 (let ((tag (funcall key-tag datum))
> =A0 =A0 =A0 =A0 =A0 =A0 (values (funcall key-datum datum)))
> =A0 =A0 =A0 =A0 (multiple-value-bind (it present)
> =A0 =A0 =A0 =A0 =A0 =A0 (gethash tag hash)
> =A0 =A0 =A0 =A0 =A0 (if present
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setf (gethash tag hash)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (apply function (gethash tag hash=
) values))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setf (gethash tag hash) values)))))
> =A0 =A0 (let (result)
> =A0 =A0 =A0 (dohash (key value hash)
> =A0 =A0 =A0 =A0 (push (list key value) result))
> =A0 =A0 =A0 result)))
>
> Comments, improvements? =A0I am looking for a general purpose function
> like reduce that I
> can apply in various situations.
>
> Thanks,
>
> Mirko
Correction: the previous code used a non-portable clisp macro
`dohash' (looks nice, doesn't it?)
Here is the version with maphash:
(defun reduce-tagged (function sequence &key
(key-tag #'first)
(key-datum #'rest))
"Use a binary operation, `function' to combine a sequence of tagged
elements. like-tagged elements are `reduce'd according to `function'
`sequence' is a sequence of tagged elements. reduce-m will reduce
like-tagged-elements.
If `key-tag' is supplied it is used to extract the element tag. If
`key-tag' is not supplied, the function `first' is used.
If `key-datum' is supplied, it is used to extract the element datum.
If `key-datum' is not supplied, the function `rest' is used.
"
(let ((hash (make-hash-table)))
(dolist (datum sequence)
(let ((tag (funcall key-tag datum))
(values (funcall key-datum datum)))
(multiple-value-bind (it present)
(gethash tag hash)
(declare (ignore it))
(if present
(setf (gethash tag hash)
(apply function (gethash tag hash) values))
(setf (gethash tag hash) values)))))
(let (result)
(maphash #'(lambda(key value)
(push (list key value) result))
hash)
result)))
Mirko
------------------------------
Date: Mon, 27 Sep 2010 08:50:39 -0700 (PDT)
From: Mirko <mirko.vukovic@gmail.com>
Subject: Re: reduce-tagged (was Re: toy list processing problem: collect similar terms)
Message-Id: <319ddef7-1ad0-4913-bded-ddf97bc40476@j18g2000yqd.googlegroups.com>
On Sep 27, 11:40=A0am, Mirko <mirko.vuko...@gmail.com> wrote:
> On Sep 27, 11:18=A0am, Mirko <mirko.vuko...@gmail.com> wrote:
>
>
>
> > On Sep 26, 12:05=A0am, Xah Lee <xah...@gmail.com> wrote:
>
> > I am hijacking the following post and driving it to Cuba (the Monthy
> > Python fans will know what I refer to). =A0I want to create a `reduce'-
> > like function that can handle similar problems.
>
> > Xah said:
>
> > > here's a interesting toy list processing problem.
>
> > > I have a list of lists, where each sublist is labelled by
> > > a number. I need to collect together the contents of all sublists
> > > sharing
> > > the same label. So if I have the list
>
> > > ((0 a b) (1 c d) (2 e f) (3 g h) (1 i j) (2 k l) (4 m n) (2 o p) (4 q
> > > r) (5 s t))
>
> > > where the first element of each sublist is the label, I need to
> > > produce:
>
> > > output:
> > > ((a b) (c d i j) (e f k l o p) (g h) (m n q r) (s t))
>
> > > stuffed deleted.
>
> > Here is my Common Lisp (and I only care about Common Lisp answers)
> > attempt to create a `reduce'-like function to handle this kind of a
> > problem (you will see that I am still struggling with the code and the
> > documentation).
>
> ... faulty code deleted
Aaand one more fix (apply -> funcall) (This version at least produces
a close
facsimile of the desired output)
(defun reduce-tagged (function sequence &key
(key-tag #'first)
(key-datum #'rest))
"Use a binary operation, `function' to combine a sequence of tagged
elements. like-tagged elements are `reduce'd according to `function'
`sequence' is a sequence of tagged elements. reduce-m will reduce
like-tagged-elements.
If `key-tag' is supplied it is used to extract the element tag. If
`key-tag' is not supplied, the function `first' is used.
If `key-datum' is supplied, it is used to extract the element datum.
If `key-datum' is not supplied, the function `rest' is used.
"
(let ((hash (make-hash-table)))
(dolist (datum sequence)
(let ((tag (funcall key-tag datum))
(values (funcall key-datum datum)))
(multiple-value-bind (it present)
(gethash tag hash)
(declare (ignore it))
(if present
(setf (gethash tag hash)
(funcall function (gethash tag hash) values))
(setf (gethash tag hash) values)))))
(let (result)
(maphash #'(lambda(key value)
(push (list key value) result))
hash)
result)))
------------------------------
Date: Mon, 27 Sep 2010 08:18:22 -0700 (PDT)
From: Mirko <mirko.vukovic@gmail.com>
Subject: reduced-tagged (was Re: toy list processing problem: collect similar terms)
Message-Id: <8e54fd9c-1d6b-433c-b306-288a7341bc98@a36g2000yqc.googlegroups.com>
On Sep 26, 12:05=A0am, Xah Lee <xah...@gmail.com> wrote:
I am hijacking the following post and driving it to Cuba (the Monthy
Python fans will know what I refer to). I want to create a `reduce'-
like function that can handle similar problems.
Xah said:
> here's a interesting toy list processing problem.
>
> I have a list of lists, where each sublist is labelled by
> a number. I need to collect together the contents of all sublists
> sharing
> the same label. So if I have the list
>
> ((0 a b) (1 c d) (2 e f) (3 g h) (1 i j) (2 k l) (4 m n) (2 o p) (4 q
> r) (5 s t))
>
> where the first element of each sublist is the label, I need to
> produce:
>
> output:
> ((a b) (c d i j) (e f k l o p) (g h) (m n q r) (s t))
>
> stuffed deleted.
Here is my Common Lisp (and I only care about Common Lisp answers)
attempt to create a `reduce'-like function to handle this kind of a
problem (you will see that I am still struggling with the code and the
documentation).
(defun reduce-tagged (function sequence &key
(key-tag #'first)
(key-datum #'rest))
"Use a binary operation, `function' to combine a sequence of tagged
elements. like-tagged elements are `reduce'd according to `function'
and returned in a list ...
`sequence' is a sequence of tagged elements. reduce-m will reduce
like-tagged-elements.
If `key-tag' is supplied it is used to extract the element tag. If
`key-tag' is not supplied, the function `first' is used.
If `key-datum' is supplied, it is used to extract the element datum.
If `key-datum' is not supplied, the function `rest' is used.
"
(let ((hash (make-hash-table)))
(dolist (datum sequence)
(let ((tag (funcall key-tag datum))
(values (funcall key-datum datum)))
(multiple-value-bind (it present)
(gethash tag hash)
(if present
(setf (gethash tag hash)
(apply function (gethash tag hash) values))
(setf (gethash tag hash) values)))))
(let (result)
(dohash (key value hash)
(push (list key value) result))
result)))
Comments, improvements? I am looking for a general purpose function
like reduce that I
can apply in various situations.
Thanks,
Mirko
------------------------------
Date: Mon, 27 Sep 2010 06:27:00 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: why does this happen?
Message-Id: <86d3rzq0a3.fsf@gareth.avalon.lan>
Hadron<hadronquark@gmail.com> writes:
> Mart van de Wege <mvdwege@mail.com> writes:
>
>> Hadron<hadronquark@gmail.com> writes:
>>
>>> Mart van de Wege <mvdwege@mail.com> writes:
>>>
>>>> Hadron<hadronquark@gmail.com> writes:
>>>>
>>>>>
>>>>> As a side note regarding perl if he's a complete beginner which seems
>>>>> likely it might be worth suggesting he doesnt put his scripts on the
>>>>> path and he doesn't set them for exec
>>>>
>>>> As usual, you are talking bollocks.
>>>>
>>>> He's using syntax that indicates he is *NOT* executing his scripts from
>>>> his $PATH. And as long as you do not explicitly do what every Linux
>>>> distribution has prevented you from doing, setting a script in your
>>>> current directory to executable is no problem at all.
>>>
>>> I suggested that its not on the path IN CASE : hence I mentioned
>>> SPECIFICALLY running perl. At no point did I say they are currently on
>>> the path either.
>>>
>> Actually, you did. Otherwise your suggestion that he shouldn't put his
>> scripts in his $PATH wouldn't make any sense.
>
> Oh ffs : his entire issue was permissions. My point, which I extended
> on, was that he doesnt NEED permissions AND mentioned the path too.
>
No, you didn't phrase it like that, so stop whining if people don't read
it like that.
> You're not a programmer,
I am not. I am a systems administrator that does some programming on the
side.
You, however, are a troll. Which you just proved by restarting the
cross-post after I removed the off-topic groups.
Follow-ups restored to aolu.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
------------------------------
Date: Mon, 27 Sep 2010 09:12:35 +0200
From: Hadron<hadronquark@gmail.com>
Subject: Re: why does this happen?
Message-Id: <i7pg5c$eq2$3@news.eternal-september.org>
Mart van de Wege <mvdwege@mail.com> writes:
> Hadron<hadronquark@gmail.com> writes:
>
>> Mart van de Wege <mvdwege@mail.com> writes:
>>
>>> Hadron<hadronquark@gmail.com> writes:
>>>
>>>> Mart van de Wege <mvdwege@mail.com> writes:
>>>>
>>>>> Hadron<hadronquark@gmail.com> writes:
>>>>>
>>>>>>
>>>>>> As a side note regarding perl if he's a complete beginner which seems
>>>>>> likely it might be worth suggesting he doesnt put his scripts on the
>>>>>> path and he doesn't set them for exec
>>>>>
>>>>> As usual, you are talking bollocks.
>>>>>
>>>>> He's using syntax that indicates he is *NOT* executing his scripts from
>>>>> his $PATH. And as long as you do not explicitly do what every Linux
>>>>> distribution has prevented you from doing, setting a script in your
>>>>> current directory to executable is no problem at all.
>>>>
>>>> I suggested that its not on the path IN CASE : hence I mentioned
>>>> SPECIFICALLY running perl. At no point did I say they are currently on
>>>> the path either.
>>>>
>>> Actually, you did. Otherwise your suggestion that he shouldn't put his
>>> scripts in his $PATH wouldn't make any sense.
>>
>> Oh ffs : his entire issue was permissions. My point, which I extended
>> on, was that he doesnt NEED permissions AND mentioned the path too.
>>
> No, you didn't phrase it like that, so stop whining if people don't read
> it like that.
>
>> You're not a programmer,
>
> I am not. I am a systems administrator that does some programming on the
> side.
I figured. You're total inability to process and understand my well
meant reply to the OP told me all I needed to know. You're a case of a
little knowledge being a dangerous thing.
Once more : I was correct in my reply and advice to him. Others,
including fools like you, simple tried to score points based on
perceived "sides". Once more for you : I use, program and love Linux. I
dont, however, have to listen to the whining and clueless rantingfrom
troll hunting idiots like you. IF you have something valid to add to the
OPs questions like I did please do - else fuck off and mind your own
business.
> You, however, are a troll. Which you just proved by restarting the
> cross-post after I removed the off-topic groups.
>
> Follow-ups restored to aolu.
>
> Mart
I reply to where its valid. And since you came ranting into a
concversation where you had nothing to add then you can stay in it.
That or learn to use a newsreader and ONLY post to the one group instead
of thinking any of us give a flying fuck where YOU, the big sys admin,
set the followups to.
------------------------------
Date: Mon, 27 Sep 2010 12:21:35 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: why does this happen?
Message-Id: <8662xrpjv4.fsf@gareth.avalon.lan>
Hadron<hadronquark@gmail.com> writes:
> Mart van de Wege <mvdwege@mail.com> writes:
>
>> Hadron<hadronquark@gmail.com> writes:
>>
<snip>
>>> You're not a programmer,
>>
>> I am not. I am a systems administrator that does some programming on the
>> side.
>
> I figured. You're total inability to process and understand my well
> meant reply to the OP told me all I needed to know. You're a case of a
So, where's your contribution then? I at least have my name to a minor
patch in a CPAN module. You have *never* produced anything.
You can mail the proof if you want to. I'm done with you here.
Follow-up to -9999.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 V11 Issue 3148
***************************************