[32400] in Perl-Users-Digest
Perl-Users Digest, Issue: 3667 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 16 16:09:28 2012
Date: Mon, 16 Apr 2012 13:09:09 -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, 16 Apr 2012 Volume: 11 Number: 3667
Today's topics:
Re: Can I avoid 'Possible attempt to put comments in qw <rweikusat@mssgmbh.com>
Re: Can I avoid 'Possible attempt to put comments in qw <news@lawshouse.org>
Re: Can I avoid 'Possible attempt to put comments in qw <news@lawshouse.org>
Re: Can I avoid 'Possible attempt to put comments in qw <rweikusat@mssgmbh.com>
Clever implementation for s///r (Tim McDaniel)
New text Editor <cazzaniga.sandro@gmail.com>
Re: New text Editor <ben@morrow.me.uk>
Re: New text Editor <cazzaniga.sandro@gmail.com>
Re: Why does this code works without cat ? (Tim McDaniel)
Re: Why does this code works without cat ? (Tim McDaniel)
Re: Why does this code works without cat ? <rweikusat@mssgmbh.com>
Re: Why does this code works without cat ? <m@rtij.nl.invlalid>
Re: Why does this code works without cat ? <rweikusat@mssgmbh.com>
Re: Why does this code works without cat ? <rweikusat@mssgmbh.com>
Re: Why does this code works without cat ? <m@rtij.nl.invlalid>
Re: Why does this code works without cat ? <rweikusat@mssgmbh.com>
Re: Why does this code works without cat ? <m@rtij.nl.invlalid>
Re: Why does this code works without cat ? <rweikusat@mssgmbh.com>
Re: Why does this code works without cat ? <m@rtij.nl.invlalid>
Re: Why does this code works without cat ? <rweikusat@mssgmbh.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 16 Apr 2012 12:27:13 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Can I avoid 'Possible attempt to put comments in qw() list '?
Message-Id: <87ty0japda.fsf@sapphire.mobileactivedefense.com>
Uri Guttman <uri@stemsystems.com> writes:
>>>>>> "HL" == Henry Law <news@lawshouse.org> writes:
>
> HL> I have a hash of of lists defined along these lines
>
> HL> Ab => qw(Ab Bb C DB Eb F G)
>
> HL> Some of them quite legitimately have hash characters in them, but if I
> HL> write this
>
> HL> D => qw(D E F\# G A B C\#)
>
> where did you get the idea you needed to escape # in qw? inside qw (and
> usually in other q* things) the only thing that needs escaping is the
> closing delimiter.
This is not quite true: If 'the delimiters'(s) are 'some kind of
[pairing] brackets' (at least (), {} and []), 'the closing delimiter'
only needs to be escaped if it appears at the same nesting level as
the opening delimiter, eg
[rw@sapphire]~ $perl -e '$a = qw[[[]]\]]; print $a, "\n";'
[[]]]
------------------------------
Date: Mon, 16 Apr 2012 18:49:50 +0100
From: Henry Law <news@lawshouse.org>
Subject: Re: Can I avoid 'Possible attempt to put comments in qw() list '?
Message-Id: <ZZydnQQUfOkjxhHSnZ2dnUVZ8kidnZ2d@giganews.com>
On 15/04/12 23:19, Uri Guttman wrote:
> where did you get the idea you needed to escape # in qw? inside qw (and
> usually in other q* things)
OK, OK I'll go sit on the naughty step. The answer to your question is
that the very first time I did something like that I spent about 650
msec wondering how the compiler was implemented and decided the safest
thing to do was to escape them. It worked so that's what I've done
since. Now I'm better informed and won't bother; I promise.
--
Henry Law Manchester, England
------------------------------
Date: Mon, 16 Apr 2012 18:51:40 +0100
From: Henry Law <news@lawshouse.org>
Subject: Re: Can I avoid 'Possible attempt to put comments in qw() list '?
Message-Id: <ZZydnQcUfOmxwRHSnZ2dnUVZ8kgAAAAA@giganews.com>
On 16/04/12 01:08, Ben Morrow wrote:
>
> no warnings qw{qw uninitialized}; # SHUT UP
_That's_ what I wanted. As soon as I'm allowed off the naughty step
I'll code it.
Thank you to everyone. I'm better informed generally _and_ my problem
is solved.
--
Henry Law Manchester, England
------------------------------
Date: Mon, 16 Apr 2012 19:46:32 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Can I avoid 'Possible attempt to put comments in qw() list '?
Message-Id: <87aa2bldkn.fsf@sapphire.mobileactivedefense.com>
Henry Law <news@lawshouse.org> writes:
> On 15/04/12 23:19, Uri Guttman wrote:
>
>> where did you get the idea you needed to escape # in qw? inside qw (and
>> usually in other q* things)
>
> OK, OK I'll go sit on the naughty step. The answer to your question
> is that the very first time I did something like that I spent about
> 650 msec wondering how the compiler was implemented and decided the
> safest thing to do was to escape them.
In situations likes this, it is usually a good idea to consult the
documentation.
Comments
Text from a "#" character until the end of the line is a
comment, and is ignored. Exceptions include "#" inside a
string or regular expression.
------------------------------
Date: Mon, 16 Apr 2012 19:28:34 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Clever implementation for s///r
Message-Id: <jmhrt2$vh$1@reader1.panix.com>
So I read that Perl 5.14 (and maybe earlier?) has this nice feature
s///r:
If the /r (non-destructive) option is used then it runs the
substitution on a copy of the string and instead of returning the
number of substitutions, it returns the copy whether or not a
substitution occurred. The original string is never changed when
/r is used. The copy will always be a plain string, even if the
input is an object or a tied variable.
and similarly for tr///r.
So I gather that
my @newargs = map { split ' ', tr/;,/ /r } @_;
would split each element of @_ at semicolon/comma/whitespace (multiple
delimiters in a row are the same as one, leading/trailing delimiters
are ignored), but not change @_.
Alas that I have Perl 5.8.8 at one place, and it knoweth not s///r and
tr///r. Is there any clever way to implement it? I can see no
way other than to declare a variable and assign to it, like
my @t = @_;
my @newargs = map { tr/;,/ /; split } @t;
or
my @newargs = map { my $t = $_; $t =~ tr/;,/ /; split(' ', $t) } @_;
or even -- Lord forfend --
my @newargs = map { local $_ = $_; tr/;,/ /; split } @_;
none of which are as nice (and that last, while legal, would probably
make my cow-orkers break out in hives and bring out pitchforks. Note
that "my $_" wasn't possible in 5.8.8).
Is there an efficient decent way to produce a copy of an array like @_
and break the magic link back to the original? I ask because I had
been thinking that one way to do it would be if
(@_)
or
+@_
would produce a temp copy of @_, but they don't. And
reverse reverse @_
is just too cutesy.
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Sun, 15 Apr 2012 21:19:27 -0700 (PDT)
From: Wasp <cazzaniga.sandro@gmail.com>
Subject: New text Editor
Message-Id: <3afcf095-39b7-43a9-b64f-de542efb0679@w5g2000vbv.googlegroups.com>
Hi,
I'm currently writing a little text editor in perl (I use GTK for the
GUI but I hope you can use it with curses too soon). And I wonder if
this is the better practice to put a run () function in a separate
module to have only "$ crap-> run ()" in the main script.
Thanks.
------------------------------
Date: Mon, 16 Apr 2012 14:26:18 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: New text Editor
Message-Id: <q8jt59-9gb1.ln1@anubis.morrow.me.uk>
Quoth Wasp <cazzaniga.sandro@gmail.com>:
>
> I'm currently writing a little text editor in perl (I use GTK for the
> GUI but I hope you can use it with curses too soon). And I wonder if
> this is the better practice to put a run () function in a separate
> module to have only "$ crap-> run ()" in the main script.
Yes. I might put argument parsing and such in the main program as well,
or at least calls to functions in the module to do argument parsing.
Certainly the module should not be referring to @ARGV directly.
(Oh, and when you get fed up with writing your own:
http://padre.perlide.org .)
Ben
------------------------------
Date: Mon, 16 Apr 2012 12:25:08 -0700 (PDT)
From: Wasp <cazzaniga.sandro@gmail.com>
Subject: Re: New text Editor
Message-Id: <e435c86e-568c-493f-bc29-16b299b35928@f5g2000vbt.googlegroups.com>
On Apr 16, 3:26=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Yes. I might put argument parsing and such in the main program as well,
> or at least calls to functions in the module to do argument parsing.
> Certainly the module should not be referring to @ARGV directly.
>
> (Oh, and when you get fed up with writing your own:http://padre.perlide.o=
rg.)
>
> Ben
Thanks you!
------------------------------
Date: Mon, 16 Apr 2012 04:15:49 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Why does this code works without cat ?
Message-Id: <jmg6dl$fp6$1@reader1.panix.com>
In article <20120415145533.929$wk@newsreader.com>,
<xhoster@gmail.com> wrote:
>Furthermore, [cat instead of file redirection] keeps the overall flow
>of information on a pipeline running from left to right, rather than
>zig-zagging.
In bash, file redirection characters do not need to be at the end of a
command.
$ cat /etc/motd
NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33 EST 2012
$ cat </etc/motd
NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33 EST 2012
$ </etc/motd cat
NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33 EST 2012
"man bash" on that system reports
"The following redirection operators may precede or appear anywhere
within a simple command or may follow a command. Redirections are
processed in the order they appear, from left to right.
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Mon, 16 Apr 2012 04:28:09 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Why does this code works without cat ?
Message-Id: <jmg74p$833$1@reader1.panix.com>
In article <7p7mo7pdhadhmnuojlfn7cnl336eburo2k@4ax.com>,
J_rgen Exner <jurgenex@hotmail.com> wrote:
>Reminds me of a former student who insisted on writing
> if (SomeCondition == TRUE) {...}
>every single time. Of course he got the correct result
To anyone who doesn't see how much of a disaster that code is, please
note:
In Perl and C, and doubtless other languages, it works only if
SomeCondition is guaranteed to be either TRUE (a unique numeric value)
or some other numeric value(s) that are all to be interpreted as
false. If someone else decides to assign to SomeCondition according
to the standard behavior of Perl, where any of five possible values is
false and anything else is true, that code will silently operate
incorrectly, and it looks like like ought to work.
In languages where the boolean type is strict, where it really
will be either true or false, the test above is simply useless.
Any code like the above should be flatly rejected.
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Mon, 16 Apr 2012 12:28:49 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Why does this code works without cat ?
Message-Id: <87pqb7apam.fsf@sapphire.mobileactivedefense.com>
tmcd@panix.com (Tim McDaniel) writes:
> In article <20120415145533.929$wk@newsreader.com>,
> <xhoster@gmail.com> wrote:
>>Furthermore, [cat instead of file redirection] keeps the overall flow
>>of information on a pipeline running from left to right, rather than
>>zig-zagging.
>
> In bash, file redirection characters do not need to be at the end of a
> command.
>
> $ cat /etc/motd
> NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33 EST 2012
>
> $ cat </etc/motd
> NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33 EST 2012
Unless I'm very much mistaken, the filename argument is in the same
position relative to the command both times ...
------------------------------
Date: Mon, 16 Apr 2012 14:43:09 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Why does this code works without cat ?
Message-Id: <tngt59-jb4.ln1@news.rtij.nl>
On Mon, 16 Apr 2012 12:28:49 +0100, Rainer Weikusat wrote:
> tmcd@panix.com (Tim McDaniel) writes:
>> In article <20120415145533.929$wk@newsreader.com>, <xhoster@gmail.com>
>> wrote:
>>>Furthermore, [cat instead of file redirection] keeps the overall flow
>>>of information on a pipeline running from left to right, rather than
>>>zig-zagging.
>>
>> In bash, file redirection characters do not need to be at the end of a
>> command.
>>
>> $ cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
>> EST 2012
>>
>> $ cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15
>> 19:17:33 EST 2012
>
> Unless I'm very much mistaken, the filename argument is in the same
> position relative to the command both times ...
Funny how you can make substantiated nonsense arguments if you snip the
point of the argument away. Please reread the complete original post
carefully, you'll see it does make sense then.
M4
------------------------------
Date: Mon, 16 Apr 2012 14:48:09 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Why does this code works without cat ?
Message-Id: <877gxfu6sm.fsf@sapphire.mobileactivedefense.com>
Martijn Lievaart <m@rtij.nl.invlalid> writes:
> On Mon, 16 Apr 2012 12:28:49 +0100, Rainer Weikusat wrote:
>> tmcd@panix.com (Tim McDaniel) writes:
>>> In article <20120415145533.929$wk@newsreader.com>, <xhoster@gmail.com>
>>> wrote:
>>>>Furthermore, [cat instead of file redirection] keeps the overall flow
>>>>of information on a pipeline running from left to right, rather than
>>>>zig-zagging.
>>>
>>> In bash, file redirection characters do not need to be at the end of a
>>> command.
>>>
>>> $ cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
>>> EST 2012
>>>
>>> $ cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15
>>> 19:17:33 EST 2012
>>
>> Unless I'm very much mistaken, the filename argument is in the same
>> position relative to the command both times ...
>
> Funny how you can make substantiated nonsense arguments if you snip the
> point of the argument away. Please reread the complete original post
> carefully, you'll see it does make sense then.
Funny how people always seem to misinterpret something such that it
doesn't make any sense and then try to hold the person who wrote it
responsible for that ...
The original claim was:
Furthermore, [cat instead of file redirection] keeps the
overall flow of information on a pipeline running from left to
right, rather than zig-zagging.
After I wrote my reply to the posting which contained this, it
occurred to me that this claim is actually wrong: Both
cat /some/file
and
cat </some/file
have the filename argument to the right of the command, hence, the
'zig-zagging' in the first command of a pipeline is there in both
cases. A related minor point would be that, with preciously few
exceptions, tr being the only one coming' to my mind immediately,
commands other than cat usually accept filename arguments themselves,
eg, to use one of the orginally mentioned examples, the pipeline
cat /var/log/syslog | head -n 10
and the command
head -n 10 /var/log/syslog
don't differ in this respect.
------------------------------
Date: Mon, 16 Apr 2012 14:54:18 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Why does this code works without cat ?
Message-Id: <873983u6id.fsf@sapphire.mobileactivedefense.com>
Rainer Weikusat <rweikusat@mssgmbh.com> writes:
> Martijn Lievaart <m@rtij.nl.invlalid> writes:
>> On Mon, 16 Apr 2012 12:28:49 +0100, Rainer Weikusat wrote:
>>> tmcd@panix.com (Tim McDaniel) writes:
>>>> In article <20120415145533.929$wk@newsreader.com>, <xhoster@gmail.com>
>>>> wrote:
>>>>>Furthermore, [cat instead of file redirection] keeps the overall flow
>>>>>of information on a pipeline running from left to right, rather than
>>>>>zig-zagging.
>>>>
>>>> In bash, file redirection characters do not need to be at the end of a
>>>> command.
>>>>
>>>> $ cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
>>>> EST 2012
>>>>
>>>> $ cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15
>>>> 19:17:33 EST 2012
>>>
>>> Unless I'm very much mistaken, the filename argument is in the same
>>> position relative to the command both times ...
>>
>> Funny how you can make substantiated nonsense arguments if you snip the
>> point of the argument away. Please reread the complete original post
>> carefully, you'll see it does make sense then.
>
> Funny how people always seem to misinterpret something such that it
> doesn't make any sense
Possibly, I should have deleted the 'In bash ...' sentence to make it
clearer that I was just using the two commands as an example and that
my text wasn't intended to 'argue against' the one which contained
them (OTOH, that would imply basing on argument on a gross
misrepresentation of something someone else wrote and since people
usually do this with my texts, I try to avoid that with other people's
texts as hard as possible ... IMHO, the point of a discussion is to
get a clearer picture of some set of facts and opinions about facts,
not "who won it" ...)
------------------------------
Date: Mon, 16 Apr 2012 16:22:55 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Why does this code works without cat ?
Message-Id: <vimt59-jb4.ln1@news.rtij.nl>
On Mon, 16 Apr 2012 14:48:09 +0100, Rainer Weikusat wrote:
> Martijn Lievaart <m@rtij.nl.invlalid> writes:
>> On Mon, 16 Apr 2012 12:28:49 +0100, Rainer Weikusat wrote:
>>> tmcd@panix.com (Tim McDaniel) writes:
>>>> In article <20120415145533.929$wk@newsreader.com>,
>>>> <xhoster@gmail.com> wrote:
>>>>>Furthermore, [cat instead of file redirection] keeps the overall flow
>>>>>of information on a pipeline running from left to right, rather than
>>>>>zig-zagging.
>>>>
>>>> In bash, file redirection characters do not need to be at the end of
>>>> a command.
>>>>
>>>> $ cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15
>>>> 19:17:33 EST 2012
>>>>
>>>> $ cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15
>>>> 19:17:33 EST 2012
>>>
>>> Unless I'm very much mistaken, the filename argument is in the same
>>> position relative to the command both times ...
>>
>> Funny how you can make substantiated nonsense arguments if you snip the
>> point of the argument away. Please reread the complete original post
>> carefully, you'll see it does make sense then.
>
> Funny how people always seem to misinterpret something such that it
> doesn't make any sense and then try to hold the person who wrote it
> responsible for that ...
I don think I misinterpreted anything, unless it was the voices in your
head. I´m not psychic you know, and my amulet of ESP is out of order. I
do know what I read.
> The original claim was:
>
> Furthermore, [cat instead of file redirection] keeps the overall
flow
> of information on a pipeline running from left to right, rather
than
> zig-zagging.
Uh no? At least your reply (which I reacted on) was not a reply to this
claim. Therefore, the rest of your current reply is irrelevant.
I´ĺl assume it´s a misreading on your part, but this is a technical
newsgroup where accuracy is appreciated. Please do read what is written.
What you replied to actually was an argument in favor of your position,
but it seems you managed to interpret it as an argument against your
position.
M4
------------------------------
Date: Mon, 16 Apr 2012 15:51:45 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Why does this code works without cat ?
Message-Id: <87y5pvspa6.fsf@sapphire.mobileactivedefense.com>
Martijn Lievaart <m@rtij.nl.invlalid> writes:
[...]
>> Funny how people always seem to misinterpret something such that it
>> doesn't make any sense and then try to hold the person who wrote it
>> responsible for that ...
>
> I don think I misinterpreted anything, unless it was the voices in your
> head. I´m not psychic you know, and my amulet of ESP is out of order. I
> do know what I read.
>
>> The original claim was:
>>
>> Furthermore, [cat instead of file redirection] keeps the overall
> flow
>> of information on a pipeline running from left to right, rather
> than
>> zig-zagging.
>
> Uh no? At least your reply (which I reacted on) was not a reply to this
> claim. Therefore, the rest of your current reply is irrelevant.
>
> I´ĺl assume it´s a misreading on your part, but this is a technical
> newsgroup where accuracy is appreciated. Please do read what is written.
> What you replied to actually was an argument in favor of your position,
> but it seems you managed to interpret it as an argument against your
> position.
I suggest that you read the explanation I gave (both of them,
actually) ...
------------------------------
Date: Mon, 16 Apr 2012 20:45:41 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Why does this code works without cat ?
Message-Id: <lv5u59-jb4.ln1@news.rtij.nl>
On Mon, 16 Apr 2012 15:51:45 +0100, Rainer Weikusat wrote:
> I suggest that you read the explanation I gave (both of them,
> actually) ...
You're trolling me, right?
M4
------------------------------
Date: Mon, 16 Apr 2012 19:58:26 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Why does this code works without cat ?
Message-Id: <87wr5fjygd.fsf@sapphire.mobileactivedefense.com>
Martijn Lievaart <m@rtij.nl.invlalid> writes:
> On Mon, 16 Apr 2012 15:51:45 +0100, Rainer Weikusat wrote:
>
>> I suggest that you read the explanation I gave (both of them,
>> actually) ...
>
> You're trolling me, right?
Ok, spelled out again: Your _assumption_ about my intention is wrong.
This is partially my fault because I could have made this clearer (as
detailed in my 2n post on this), however, that doesn't make your
assumption any less wrong.
------------------------------
Date: Mon, 16 Apr 2012 21:39:02 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Why does this code works without cat ?
Message-Id: <m39u59-jb4.ln1@news.rtij.nl>
On Mon, 16 Apr 2012 19:58:26 +0100, Rainer Weikusat wrote:
> Martijn Lievaart <m@rtij.nl.invlalid> writes:
>> On Mon, 16 Apr 2012 15:51:45 +0100, Rainer Weikusat wrote:
>>
>>> I suggest that you read the explanation I gave (both of them,
>>> actually) ...
>>
>> You're trolling me, right?
>
> Ok, spelled out again: Your _assumption_ about my intention is wrong.
> This is partially my fault because I could have made this clearer (as
> detailed in my 2n post on this), however, that doesn't make your
> assumption any less wrong.
You're making less and less sense.
You wrote:
> The original claim was:
>
> Furthermore, [cat instead of file redirection] keeps the overall
> flow of information on a pipeline running from left to
> right, rather than zig-zagging.
That indeed was said, but it was not what you reacted to.
You reacted to:
> In bash, file redirection characters do not need to be at the end of a
> command.
>
> $ cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
> EST 2012
>
> $ cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
> EST 2012
>
> $ </etc/motd cat NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
> EST 2012
To which you said:
> Unless I'm very much mistaken, the filename argument is in the same
> position relative to the command both times ...
(conveniently omitting the third command line)
which is completely irrelevant to both the zigzagging claim and the file
redirection claim.
So what am I missing?
M4
------------------------------
Date: Mon, 16 Apr 2012 21:06:30 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Why does this code works without cat ?
Message-Id: <87fwc3jvax.fsf@sapphire.mobileactivedefense.com>
Martijn Lievaart <m@rtij.nl.invlalid> writes:
> On Mon, 16 Apr 2012 19:58:26 +0100, Rainer Weikusat wrote:
>
>> Martijn Lievaart <m@rtij.nl.invlalid> writes:
>>> On Mon, 16 Apr 2012 15:51:45 +0100, Rainer Weikusat wrote:
>>>
>>>> I suggest that you read the explanation I gave (both of them,
>>>> actually) ...
>>>
>>> You're trolling me, right?
>>
>> Ok, spelled out again: Your _assumption_ about my intention is wrong.
>> This is partially my fault because I could have made this clearer (as
>> detailed in my 2n post on this), however, that doesn't make your
>> assumption any less wrong.
>
> You're making less and less sense.
>
> You wrote:
>
>> The original claim was:
>>
>> Furthermore, [cat instead of file redirection] keeps the overall
>> flow of information on a pipeline running from left to
>> right, rather than zig-zagging.
>
> That indeed was said, but it was not what you reacted to.
>
> You reacted to:
>
>> In bash, file redirection characters do not need to be at the end of a
>> command.
>>
>> $ cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
>> EST 2012
>>
>> $ cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
>> EST 2012
>>
>> $ </etc/motd cat NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
>> EST 2012
>
> To which you said:
>
>> Unless I'm very much mistaken, the filename argument is in the same
>> position relative to the command both times ...
Indeed. As I already explcitly wrote two times and implicitly pointed
out three times, my statement was supposed to refer to the wrong
'zig-zagging' claim and I was just using the two commands above as a
convenient example to illustrate that, without any intention
whatsoever to comment on the other content of the posting this example
came from.
[...]
> which is completely irrelevant to both the zigzagging claim and the file
> redirection claim.
The original claim was:
Furthermore, [cat instead of file redirection] keeps the overall
flow of information on a pipeline running from left to
right, rather than zig-zagging.
As illustrated in this nice example,
,----
| cat /etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33 EST 2012
|
| cat </etc/motd NetBSD 5.1.2 (PANIX-XEN3U-USER) #0: Wed Feb 15 19:17:33
`----
it actually 'zig-zags' ('zig-zaggs'?) in either case because the
filename argument is to the right either way.
------------------------------
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 3667
***************************************