develooper Front page | perl.perl6.language | Postings from May 2001

Re: Apoc2 - <STDIN> concerns

From:
Dave Storrs
Date:
May 11, 2001 10:15
Subject:
Re: Apoc2 - <STDIN> concerns
Message ID:
Pine.BSF.4.21.0105111007550.98136-100000@megazone23.bigpanda.com


On Fri, 11 May 2001, Larry Wall wrote:

> Dave Storrs writes:
> : calling the function that produced the string, or whatever.  I just think
> : that we could extend 'x' to have a general repetition meaning.
> 
> I think just patching one operator from verbal status to adverbial
> status is not sufficiently general.  [...]
>     <$STDIN> MUMBLE 2			# read twice
>     1 .. 100 MUMBLE 3			# count by threes
>     `glob $x` MUMBLE "/bin/csh"		# modify pseudoquote
> 
> It has not yet been decided what form these MUMBLEs will take, 
> [...but maybe the default]
> adverbial MUMBLE is simply ":".  Which might cause the above to reduce
> to:
> 
>     <$STDIN> : 2			# read twice
>     1 .. 100 : 3			# count by threes
>     `glob $x` : "/bin/csh"		# modify pseudoquote


	Wow.  This is great; very powerful and very elegant...how
Perlish.  

	$verb = "I " cc 'tow'x2  cc ' admiringly';
	$verb =~ s/t/k/;   

	# ;>

Dave		




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About