Re: Something akin to ksh's <() and >() syntax

2000-08-25 Thread David L. Nicol




My largely ignored RFC about "shell style redirection" suggested
pretty much this.  perl5 has it as a feature hidden on the fourth page
of the perldoc for "open"

It also lets < neatly double as a compact print operator



Chaim Frenkel wrote:
> 
> With threading coming, would having a >() and <() syntax be useful?
> 
> So within the >() and <() constructs STDIN and STDOUT (or perhaps only
> the default filehandle) would be redirected.
> 
> sub proc_arg1 { while(<>) {  } }
> sub proc_arg2 { while(<>) {  } }
> 
> while(<>) {
> (<{proc_arg1}, <{proc_arg2}) = split;
> }
> 
> Damian, You have coroutines/generators out there. What about a data sink?
> Anything you have currently proposed that would do this neatly.
> 
> 
> --
> Chaim FrenkelNonlinear Knowledge, Inc.
> [EMAIL PROTECTED]   +1-718-236-0183

-- 
  David Nicol 816.235.1187 [EMAIL PROTECTED]
   safety first: Republicans for Nader in 2000



Something akin to ksh's <() and >() syntax

2000-08-25 Thread Chaim Frenkel

With threading coming, would having a >() and <() syntax be useful?

So within the >() and <() constructs STDIN and STDOUT (or perhaps only
the default filehandle) would be redirected.

sub proc_arg1 { while(<>) {  } }
sub proc_arg2 { while(<>) {  } }

while(<>) {
(<{proc_arg1}, <{proc_arg2}) = split;
}


Damian, You have coroutines/generators out there. What about a data sink?
Anything you have currently proposed that would do this neatly.


-- 
Chaim FrenkelNonlinear Knowledge, Inc.
[EMAIL PROTECTED]   +1-718-236-0183