Re: Apoc2 - STDIN concerns

2001-05-05 Thread Uri Guttman
NW == Nathan Wiger [EMAIL PROTECTED] writes: NW As for as a qw() replacement, I think there are really two NW issues here. First, you're not really talking about a NW replacement, since you're mentioning different semantics. So NW qw() will still be widely used. I suggest that we

Re: Apoc2 - STDIN concerns

2001-05-05 Thread Bryan C . Warnock
On Saturday 05 May 2001 19:28, Uri Guttman wrote: the proposed qh only fails with a key or value of = which is highly unlikely and can be worked around as a value by inserting another = %foo = qh( foo bar = = baz ) is: %foo = ( foo = 1, bar = '=', baz = 1 ) Or it could be

Re: Apoc2 - STDIN concerns

2001-05-04 Thread David L. Nicol
if we kept with their current meaning but added it as a handier whitespace quoter I would like that. p5: @things = one two three four five; _is_ currently a syntax error. In my mind. Not in my 5.005_03. however, where it appears to behave just like qw does, except that it does

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Simon Cozens
On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: : while ($STDIN) { ... } I'm wondering what this will do? $thingy = $STDIN; This seems to have two possibilities: 1. Make a copy of $STDIN This one. I see a filehandle in *boolean* context meaning read to $_, just like

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Simon Cozens
On Fri, May 04, 2001 at 07:34:24PM -0500, David L. Nicol wrote: @things = one two three four five; _is_ currently a syntax error. In my mind. Not in my 5.005_03. however, where it appears to behave just like qw does, except that it does interpolation, which qw does not. And shell

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Damian Conway
I'm wondering what this will do? $thingy = $STDIN; This seems to have two possibilities: 1. Make a copy of $STDIN This one. I see a filehandle in *boolean* context meaning read to $_, just like the current while (FOO) magic we all know and occasionally

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Simon Cozens
On Sat, May 05, 2001 at 11:13:40AM +1000, Damian Conway wrote: love. I'd expect $FOO.readln (or something less Pascalish) to do an $STDIN.next is the current plan. Ah, OK. Crystal ball was a bit cloudy there. -- Putting heated bricks close to the news.admin.net-abuse.* groups.

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Larry Wall
Simon Cozens writes: : On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: : : while ($STDIN) { ... } : I'm wondering what this will do? : $thingy = $STDIN; : This seems to have two possibilities: : 1. Make a copy of $STDIN : : This one. I see a filehandle in *boolean*

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Nathan Wiger
: This one. I see a filehandle in *boolean* context meaning read to $_, : just like the current while (FOO) magic we all know and occasionally : love. I'd expect $FOO.readln (or something less Pascalish) to do an : explicit readline to a variable other than $_ It would be $FOO.next, but

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Michael G Schwern
On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: I'm wondering what this will do? $thingy = $STDIN; This seems to have two possibilities: 1. Make a copy of $STDIN 2. Read a line from $STDIN While perhaps inconsistent, I'd really rather it did #2. Here's the

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Nathan Wiger
While perhaps inconsistent, I'd really rather it did #2. Here's the basic argument... compare how often you dup a filehandle with how often you read from one. Duping is swamped by several orders of magnitude. Dup with $fh = $STDIN.copy; (or whatever). $line = $STDIN.next should still

Re: Apoc2 - STDIN concerns

2001-05-04 Thread James Mastros
From: Michael G Schwern [EMAIL PROTECTED] To: Nathan Wiger [EMAIL PROTECTED] Sent: Friday, May 04, 2001 9:46 PM On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: I'm wondering what this will do? $thingy = $STDIN; This seems to have two possibilities: 1. Make a copy of

Re: Apoc2 - STDIN concerns

2001-05-04 Thread James Mastros
From: Nathan Wiger [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, May 04, 2001 10:02 PM Subject: Re: Apoc2 - STDIN concerns You know, I hear what you're saying, but it really makes the little hairs on my neck stand up. Just imaging trying to teach this: $a = $b;# assignment

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Michael G Schwern
On Fri, May 04, 2001 at 07:02:14PM -0700, Nathan Wiger wrote: While perhaps inconsistent, I'd really rather it did #2. Here's the basic argument... compare how often you dup a filehandle with how often you read from one. Duping is swamped by several orders of magnitude. Dup with $fh =

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Larry Wall
Nathan Wiger writes: : : This one. I see a filehandle in *boolean* context meaning read to $_, : : just like the current while (FOO) magic we all know and occasionally : : love. I'd expect $FOO.readln (or something less Pascalish) to do an : : explicit readline to a variable other than $_ :

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Nathan Wiger
We do have to worry about the Cnext loop control function though. It's possible that in FOO: while (1) { next FOO if /foo/; ... } the CFOO label is actually being recognized as a pseudo-package name! The loop could well be an object whose full name is CMY::FOO. Or something

Re: Apoc2 - STDIN concerns

2001-05-04 Thread Dan Sugalski
At 07:56 PM 5/4/2001 -0700, Larry Wall wrote: Nathan Wiger writes: : : This one. I see a filehandle in *boolean* context meaning read to $_, : : just like the current while (FOO) magic we all know and occasionally : : love. I'd expect $FOO.readln (or something less Pascalish) to do an : :

<    1   2