Re: pascal-like with was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Dave Storrs
This seems good...the HOF stuff seems to have pretty well accepted, and the thumbtack notation with it. Dave On Thu, 17 Aug 2000, Clayton Scott wrote: On Wed, 16 Aug 2000, David L. Nicol wrote: %record = loadrecord($studentID); with %record {

Re: pascal-like with was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread John Porter
Dave Storrs wrote: On 17 Aug 2000, Johan Vromans wrote: Dave Storrs [EMAIL PROTECTED] writes: 2) "express" should guarantee that, before it creates a variable names $FOO, it first calls "local" on any existing $FOO Why, if the variable is lexical (see 3)? D'oh. s{2) .+^}{}

Re: pascal-like with was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Damian Conway
This seems less of a leap of logic/faith: %record = loadrecord($studentID); with %record { print SPAM; Dear ^name: Your tuition is now due. Please send in a payment of at least ^minumum. SPAM }; "I do not thin' that

Re: pascal-like with was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Clayton Scott
Damian Conway wrote: So Cwith is going to have to do some pretty freaky magic to work out it should call that sub as part of the Cprint. And call it with a specifically ordered argument list. Yes, I never said it would work, just that it looked nicer :) However, your suggestion

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Chaim Frenkel
I'm not sure if you are disagreeing with me or not. The context was the statment that $STDOUT is the _default_ filehandle. I was pointing out that by _overriding_ the instantaneous meaning of $STDOUT to the default fail handle, one would lose the immediate access to the previous value. I.e.

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Nathan Wiger
Chaim Frenkel wrote: Unless one wants to have a $DEFAULT filehandle and get rid of single arg select. Great minds think alike. :-) I'm in the process of codifying an RFC that will be titled something like: "Replace default filehandle / select with $OUTPUT fileobject" (chose $OUTPUT b/c

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Nathan Wiger
Chaim Frenkel wrote: NW P.S. If you're not on -io, this implicitly means you DON'T CARE and are NW willing to accept whatever we come up with. So, everyone that's NW interested please get on -io. Thanks again. That's a bit strong. All we are doing is filtering the garbage for Larry.

Re: command line option: $|++

2000-08-15 Thread Ed Mills
Aug 5 1999 Digest.pm From: Uri Guttman [EMAIL PROTECTED] Reply-To: Uri Guttman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: command line option: $|++ Date: Tue, 15 Aug 2000 00:08:24 -0400 i just found an interseting little oddity i want fixed. i (like many of you) run one liners for testing

Re: command line option: $|++

2000-08-15 Thread Casey R. Tweten
time when i want to edit the previous line only a little : bit. i tried using ssfe (split screen front end, comes with sirc char : client) and i saw no output due to pipe buffering. so i had to put a : $|++ in the one liner to make it work. perl6 should have a command line : option to enable

Re: command line option: $|++

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 09:14:20AM -0400, Casey R. Tweten wrote: This, by the way (even as a test) was agravating to me because in order to get decent output I really had to do this: cat /etc/passwd | perl -nfe '$\="\n";print((split/:/)[0])' cat /etc/passwd | perl -lnfe

Re: command line option: $|++

2000-08-15 Thread Nathan Wiger
Ed Mills wrote: Sounds like a good idea. I propose a commandline arg that gives info about modules in @INC also. I emailed this to the list earlier but it never seemed to make it. Something like perl -M 'Digest' might return: /usr/local/lib/perl5/site_perl/: -r--r--r-- 1

Re: command line option: $|++

2000-08-15 Thread Casey R. Tweten
Today around 11:01am, Jonathan Scott Duff hammered out this masterpiece: : On Tue, Aug 15, 2000 at 09:14:20AM -0400, Casey R. Tweten wrote: : This, by the way (even as a test) was agravating to me because in order to : get decent output I really had to do this: : : cat /etc/passwd | perl

Re: command line option: $|++

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 10:03:55AM -0700, Nathan Wiger wrote: Jonathan Scott Duff wrote: Well, now it's my turn to suggest something ;- How about we give perl the ability to look for a .perlrc file? (Yes, I know the reasons against, but everything is up for grabs now right? :-) If

Re: command line option: $|++

2000-08-15 Thread Peter Scott
At 12:31 PM 8/15/00 -0400, Casey R. Tweten wrote: Frankly, they're both ugly. I personally like the *idea*, I'm not advocating my solution. It would be wonderful if we could assign values to Perl's special variables when we're doing a one line quick hack. With a bit of luck, the special

Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Nathan Wiger
Peter Scott wrote: I don't want to be in the -io discussion; I just want to know the conclusions that might affect -language. It seems silly to discuss command-line options for setting $| here if there isn't going to be a $|. Ok, read this thread (4 messages long):

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: This is a succinct summary of the basic conclusions thus far: 1. a default filehandle IS needed sometimes, but only for stuff like print Well, I think that Cprint should always print to $PERL::STDOUT (or whatever we call

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Nathan Wiger
Jonathan Scott Duff wrote: On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: This is a succinct summary of the basic conclusions thus far: 1. a default filehandle IS needed sometimes, but only for stuff like print Well, I think that Cprint should always print to

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Chaim Frenkel
"JSD" == Jonathan Scott Duff [EMAIL PROTECTED] writes: JSD On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: This is a succinct summary of the basic conclusions thus far: 1. a default filehandle IS needed sometimes, but only for stuff like print JSD Well, I think that Cprint

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Chaim Frenkel
"NW" == Nathan Wiger [EMAIL PROTECTED] writes: NW2. $|, $\, $/, etc will probably go away entirely in NW favor of object methods such as $handle-autoflush It think they will still be needed as lexical variables used as an initializer for the corresponding per-filehandle value. chaim

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Peter Scott
At 12:57 PM 8/15/00 -0700, Nathan Wiger wrote: This is a succinct summary of the basic conclusions thus far: 1. a default filehandle IS needed sometimes, but only for stuff like print 2. $|, $\, $/, etc will probably go away entirely in favor of object methods such as

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 06:53:30PM -0400, Chaim Frenkel wrote: What if you want to print to a default file handle and also to STDOUT? select(OTHERFH); print "This goest to OTHERFH\n"; print STDOOUT "This went to STDOUT\n"; print $_ "Here I come to save the day!\n" for

Re: command line option: $|++

2000-08-15 Thread Nathan Wiger
Peter Scott wrote: Can someone knowledgeable on this issue speak to it? Will $| $/ $\ et al be retired, or be valid for some default filehandle? Will there still be default filehandles? There's been a big debate on the -io list about this. No clear decisions yet, but looks like the

Re: command line option: $|++

2000-08-15 Thread Nathan Wiger
Jonathan Scott Duff wrote: Well, now it's my turn to suggest something ;- How about we give perl the ability to look for a .perlrc file? (Yes, I know the reasons against, but everything is up for grabs now right? :-) If we do this, it should be off by default. csk/ksh make you turn it