Re: splitting a line
am 21.10.2007 07:47:12 von jurgenex
Wade Ward wrote:
> One of my goals for last night's reading was to figure out how to
> split up a line of a script.
What exactly do you mean by "splitting up a line of a script". The basic
unit of a Perl program is not a line but a statement. Actually perl doesn't
even know or care about lines (well, except for the running line counter, of
course).
> I have syntax confusion on this point,
> not helped by being unable to find anything on it in the camel book.
That is not surprising because lines are irrelevant to Perl's syntax and
therefore of course are not mentioned anywhere in the syntax definition.
Perl does not care if a program is written in 50 short lines or in 5 very
long lines.
> In fortran you put ampersand at the end of line .3 and at the
> beginning of line .7:
> statement .2 &
> & statement .8
I have no idea what a .7 line, a .2 statement or a .8 statement is supposed
to be.
> Since perl has semicolons at the end of statements, this would be:
>
> statement .2 &;
> & statement .8;
>
> Is there a zeroeth order substittution to make the above
> syntactically-correct perl?
I have no idea what a "zeroeth order substittution" is.
jue
splitting a line
am 21.10.2007 08:33:03 von merl the perl
One of my goals for last night's reading was to figure out how to split up a
line of a script. I have syntax confusion on this point, not helped by
being unable to find anything on it in the camel book.
In fortran you put ampersand at the end of line .3 and at the beginning of
line .7:
statement .2 &
& statement .8
Since perl has semicolons at the end of statements, this would be:
statement .2 &;
& statement .8;
Is there a zeroeth order substittution to make the above
syntactically-correct perl?
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."
Re: splitting a line
am 21.10.2007 08:45:28 von jurgenex
Wade Ward wrote:
> "Jürgen Exner" wrote in message
> news:AJBSi.750$6P3.428@trndny02...
>> Wade Ward wrote:
>>> In fortran you put ampersand at the end of line .3 and at the
>>> beginning of line .7:
>>> statement .2
> usenet is about 80 chars wide.
> I don't like exceeding 65.
That's great and very considerate of you.
Unfortunately it still doesn't explain what a .3 line, a .7 line, and a .2
statement are supposed to be.
> If there were--and it sounds like there really is only one line in a
> perlscript--
> one line in a perlscript
> , how would I put it on usenet without making huge errors?
As far as Perl and perl are concerned there are no lines in a Perl script(*)
at all. It's like asking how many inches are in a cup of sugar. Yeah, there
are ways to measure the hight of the sugar, but the baking recipie doesn't
care because it measures in cups.
Lines are useful organizational aides for human readability and nobody
should dismiss their importance.
So just use them to structure the optical layout of your program text such
that it is the easiest to read. "perldoc perlstyle" has some good
recommendations.
(*) Please note, I'm assuming you are talking about the programming language
Perl and scripts written in this language. Perlscript does exist, too, and
it is quite a different animal.
>>> Is there a zeroeth order substittution to make the above
>>> syntactically-correct perl?
>>
>> I have no idea what a "zeroeth order substittution" is.
> You get out of your depth pretty quickly in logic.
Yeah, I am known to have poor mindreading capabilities.
> Not everybody's thang.
What on earth are you talking about??? http://en.wikipedia.org/wiki/Thang
jue
Re: splitting a line
am 21.10.2007 09:25:21 von merl the perl
"Jürgen Exner" wrote in message
news:AJBSi.750$6P3.428@trndny02...
> Wade Ward wrote:
>> I have syntax confusion on this point,
>> not helped by being unable to find anything on it in the camel book.
>
> That is not surprising because lines are irrelevant to Perl's syntax and
> therefore of course are not mentioned anywhere in the syntax definition.
> Perl does not care if a program is written in 50 short lines or in 5 very
> long lines.
Perl is sooo different from fortran.
>> In fortran you put ampersand at the end of line .3 and at the
>> beginning of line .7:
>> statement .2
usenet is about 80 chars wide.
I don't like exceeding 65.
If there were--and it sounds like there really is only one line in a
perlscript--
one line in a perlscript
, how would I put it on usenet without making huge errors?
&
>> & statement .8
>
> I have no idea what a .7 line, a .2 statement or a .8 statement is
> supposed to be.
>
>> Since perl has semicolons at the end of statements, this would be:
>>
>> statement .2 &;
>> & statement .8;
>>
>> Is there a zeroeth order substittution to make the above
>> syntactically-correct perl?
>
> I have no idea what a "zeroeth order substittution" is.
You get out of your depth pretty quickly in logic. Not everybody's thang.
Cheers,
--
wade ward
wade@zaxfuuq.net
"Der Katze tritt die Treppe hoch; Der Kater tritt sie krumm.%
% De Teufel geit um; er bringt de menschen allet dumm."
schau, schau
Re: splitting a line
am 21.10.2007 12:56:09 von merl the perl
"Jürgen Exner" wrote in message
news:cACSi.851$Y23.18@trndny04...
> Wade Ward wrote:
>> "Jürgen Exner" wrote in message
>> news:AJBSi.750$6P3.428@trndny02...
>>> Wade Ward wrote:
>>>> In fortran you put ampersand at the end of line .3 and at the
>>>> beginning of line .7:
>>>> statement .2
>> usenet is about 80 chars wide.
>> I don't like exceeding 65.
>
> That's great and very considerate of you.
It's not so much great as considerate. Very--.
> Unfortunately it still doesn't explain what a .3 line, a .7 line, and a .2
> statement are supposed to be.
>
>> If there were--and it sounds like there really is only one line in a
>> perlscript--
>> one line in a perlscript
>> , how would I put it on usenet without making huge errors?
>
> As far as Perl and perl are concerned there are no lines in a Perl
> script(*) at all. It's like asking how many inches are in a cup of sugar.
> Yeah, there are ways to measure the hight of the sugar, but the baking
> recipie doesn't care because it measures in cups.
>
> Lines are useful organizational aides for human readability and nobody
> should dismiss their importance.
> So just use them to structure the optical layout of your program text such
> that it is the easiest to read. "perldoc perlstyle" has some good
> recommendations.
>
> (*) Please note, I'm assuming you are talking about the programming
> language Perl and scripts written in this language. Perlscript does exist,
> too, and it is quite a different animal.
??
>>>> Is there a zeroeth order substittution to make the above
>>>> syntactically-correct perl?
>>>
>>> I have no idea what a "zeroeth order substittution" is.
>> You get out of your depth pretty quickly in logic.
0th order logic does what michele just did. It can take any word and
replace it.
Michele iz a dago. =>
Michele iz a wop =>.
Michele iz a hot_bitch. =>
Shit_I_should_know_I_fucked_her iz a hot_bitch.
=>
a.
123456789123456789212345678931234567894123456789512345678961 2345
>
> Yeah, I am known to have poor mindreading capabilities.
A categorical falsehood.
>> Not everybody's thang.
>
> What on earth are you talking about??? http://en.wikipedia.org/wiki/Thang
It's your thang,
do what you want to do.
Jürg, I can't afford to have you give up. That's puts me all in. That puts
*you* all in.
--
wade ward
wade@zaxfuuq.net
"Det Katzchen tritt det Trepp hoch youbetcha; Der Kater tritt sie krumm.%
% De Teufel geit um; er bringt de menschen allet dumm."
schau, schau
Re: splitting a line
am 21.10.2007 13:46:24 von Tad McClellan
Wade Ward wrote:
> One of my goals for last night's reading was to figure out how to split up a
> line of a script. I have syntax confusion on this point,
Duh, then you should read the std docs regarding Perl's syntax.
> not helped by
> being unable to find anything on it in the camel book.
The 2nd paragraph in
perldoc perlsyn
Perl is a free-form language, you can format and indent it
however you like.
> Since perl has semicolons at the end of statements,
Perl (nor perl) has semicolons at the end of statements.
Perl has semicolons *between* statements.
Many other programming languages use semicolon as a "statement terminator",
Perl however uses semicolons as a "statement separator".
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
Re: splitting a line
am 21.10.2007 13:48:48 von Jeremy Numer
On 10/21/2007 05:56 AM, Wade Ward wrote:
> 0th order logic does what michele just did. It can take any word and
> replace it.
> [...]
>
1. Wikipedia and wiktionary searches for "zeroth order substitution"
don't turn up anything.
2. Michele is a man.
3. Michele hasn't said anything in this thread yet.
Re: splitting a line
am 21.10.2007 15:02:10 von Michele Dondi
On Sun, 21 Oct 2007 06:45:28 GMT, "Jürgen Exner"
wrote:
>As far as Perl and perl are concerned there are no lines in a Perl script(*)
>at all. It's like asking how many inches are in a cup of sugar. Yeah, there
I would say that "fundamentally" there are no lines. Consider e.g.
comments, regexen, literal strings.
>(*) Please note, I'm assuming you are talking about the programming language
>Perl and scripts written in this language. Perlscript does exist, too, and
>it is quite a different animal.
Yes, he's talking about the "PPL"! :P
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
Re: splitting a line
am 21.10.2007 15:22:14 von merl the perl
"Tad McClellan" wrote in message
news:slrnfhmel4.p8l.tadmc@tadmc30.sbcglobal.net...
> Wade Ward wrote:
>> One of my goals for last night's reading was to figure out how to split
>> up a
>> line of a script. I have syntax confusion on this point,
>
>
> Duh, then you should read the std docs regarding Perl's syntax.
34 fucking tabs. Where;s evelyn ruud?
>> not helped by
>> being unable to find anything on it in the camel book.
>
>
> The 2nd paragraph in
>
> perldoc perlsyn
I'll try to imagine what 2 and 34 have to do with each other. The answer of
cousre is gauss.
> Perl is a free-form language, you can format and indent it
> however you like.
>
>
>> Since perl has semicolons at the end of statements,
>
>
> Perl (nor perl) has semicolons at the end of statements.
?
> Perl has semicolons *between* statements.
>
> Many other programming languages use semicolon as a "statement
> terminator",
> Perl however uses semicolons as a "statement separator".
ok
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
34 TABS TO GET THROUgh IT?
--
wade ward
wade@zaxfuuq.net
"Dee Katze tritt die Treppe hoch; Der Kater tritt sie krumm.%
% De Teufel geit um; er bringt de menschen allet dumm."
schau, schau
Re: splitting a line
am 21.10.2007 15:24:24 von jurgenex
Michele Dondi wrote:
> On Sun, 21 Oct 2007 06:45:28 GMT, "Jürgen Exner"
> wrote:
>
>> As far as Perl and perl are concerned there are no lines in a Perl
>> script(*) at all. It's like asking how many inches are in a cup of
>> sugar. Yeah, there
>
> I would say that "fundamentally" there are no lines. Consider e.g.
> comments, regexen, literal strings.
Fair enough. You are right, there are some tokens where line breaks are
significant.
>> (*) Please note, I'm assuming you are talking about the programming
>> language Perl and scripts written in this language. Perlscript does
>> exist, too, and it is quite a different animal.
>
> Yes, he's talking about the "PPL"! :P
Just which one? :-/
The people? Or the Privat Pilot License? Or the Polymorphic Programming
Language by Standish (at least this one would have some relation to the
comp.lang hierarchie)?
jue
Re: splitting a line
am 21.10.2007 15:46:12 von merl the perl
"Jeremy Numer" wrote in message
news:13hmh21efqmvi65@corp.supernews.com...
> On 10/21/2007 05:56 AM, Wade Ward wrote:
>> 0th order logic does what michele just did. It can take any word and
>> replace it.
>> [...]
the def ^^^^^.
> 1. Wikipedia and wiktionary searches for "zeroth order substitution" don't
> turn up anything.
It should plebably be "zeroeth."
> 2. Michele is a man.
To you. I think you have no idea hoew false this statemwnent is.
> 3. Michele hasn't said anything in this thread yet.
Wait about five minutes.
--
wade ward
wade@zaxfuuq.net
"Der Katze tritt die Treppe hoch; Der Kater tritt sie krumm.%
% De Teufel geit um; er bringt de menschen allet dumm."
schau, schau
Re: splitting a line
am 21.10.2007 16:48:35 von Michele Dondi
On Sun, 21 Oct 2007 06:46:12 -0700, "Wade Ward"
wrote:
>> 2. Michele is a man.
>To you. I think you have no idea hoew false this statemwnent is.
I think YOU have no idea hoew false this statemwnent is.
AFAIK I'm a man.
>> 3. Michele hasn't said anything in this thread yet.
>Wait about five minutes.
Am I within 300 seconds?
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
Re: splitting a line
am 21.10.2007 16:51:21 von Michele Dondi
On Sun, 21 Oct 2007 06:22:14 -0700, "Wade Ward"
wrote:
>> Duh, then you should read the std docs regarding Perl's syntax.
>34 fucking tabs. Where;s evelyn ruud?
Tabs?
>> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
>34 TABS TO GET THROUgh IT?
Tabs?!?
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
Re: splitting a line
am 21.10.2007 17:42:37 von RedGrittyBrick
Michele Dondi wrote:
> On Sun, 21 Oct 2007 06:22:14 -0700, "Wade Ward"
> wrote:
>
>>> Duh, then you should read the std docs regarding Perl's syntax.
>> 34 fucking tabs. Where;s evelyn ruud?
>
> Tabs?
>
>>> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
>> 34 TABS TO GET THROUgh IT?
>
> Tabs?!?
>
I find Wade is episodically a bit difficult to understand. I did wonder
if these tabs were the reason:
http://www.outtherescrapbooking.com/images/LARGE/Beer-Tabs.g if
;-)
Re: splitting a line
am 21.10.2007 18:02:43 von Michele Dondi
On Sun, 21 Oct 2007 16:42:37 +0100, RedGrittyBrick
wrote:
>I find Wade is episodically a bit difficult to understand. I did wonder
I suppose that he's talking about his browser tabs, but I can't
understand why -exactly- he has 34 open for perl's docs.
>if these tabs were the reason:
>http://www.outtherescrapbooking.com/images/LARGE/Beer-Tabs. gif
LOL Out Loud!
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
Re: splitting a line
am 21.10.2007 21:21:28 von Ron Bergin
On Oct 20, 11:33 pm, "Wade Ward" wrote:
> One of my goals for last night's reading was to figure out how to split up a
> line of a script. I have syntax confusion on this point, not helped by
> being unable to find anything on it in the camel book.
>
> In fortran you put ampersand at the end of line .3 and at the beginning of
> line .7:
> statement .2 &
> & statement .8
>
> Since perl has semicolons at the end of statements, this would be:
>
> statement .2 &;
> & statement .8;
>
> Is there a zeroeth order substittution to make the above
> syntactically-correct perl?
> --
> wade ward
> "Nicht verzagen, Bruder Grinde fragen."
Pick up a copy of "Perl Best Practices" http://www.oreilly.com/catalog/perlbp/
Chapter 2 (Code Layout) directly answers your question along with any
additional related formatting questions you may have.
Re: splitting a line
am 22.10.2007 16:52:28 von Ted Zlatanov
On Sun, 21 Oct 2007 00:25:21 -0700 "Wade Ward" wrote:
WW> usenet is about 80 chars wide.
WW> I don't like exceeding 65.
Remember, in residential zones you can't go over 35.
Ted
Re: splitting a line
am 23.10.2007 00:10:24 von Tad McClellan
Ted Zlatanov wrote:
> On Sun, 21 Oct 2007 00:25:21 -0700 "Wade Ward" wrote:
>
> WW> usenet is about 80 chars wide.
> WW> I don't like exceeding 65.
>
> Remember, in residential zones you can't go over 35.
and splitting a lane is OK in California, but it is still
a very bad idea.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"