Re: Writing functions like MAP

2010-07-08 Thread C.DeRykus
On Jul 7, 4:32 am, chas.ow...@gmail.com ("Chas. Owens") wrote: > On Wed, Jul 7, 2010 at 06:57, Srinivasa Chaitanya > T wrote: > > Thanks that solves the my question. Also I want a write function similar to > > "map" for hash. > > I can use map itself for that, but I have to refer the hash variable

Re: Writing functions like MAP

2010-07-07 Thread Chas. Owens
On Wed, Jul 7, 2010 at 06:57, Srinivasa Chaitanya T wrote: > Thanks that solves the my question. Also I want a write function similar to > "map" for hash. > I can use map itself for that, but I have to refer the hash variable name in > code block. > How I write without referring the variable? > >

Re: Writing functions like MAP

2010-07-07 Thread Chas. Owens
On Wed, Jul 7, 2010 at 02:27, Uri Guttman wrote: >> "SCT" == Srinivasa Chaitanya T writes: > >  SCT>  How can I write functions which accept block as an argument? >  SCT> Basically I want to create a function with like which just >  SCT> executes the block and doesn't create an array. > > thi

Re: Writing functions like MAP

2010-07-07 Thread Chas. Owens
On Wed, Jul 7, 2010 at 02:19, Srinivasa Chaitanya T wrote: > Hi, >  How can I write functions which accept block as an argument? Basically I > want to create a  function with like which just executes the block and > doesn't create an array. > > -- > T Srinivasa Chaitanya > Unfortunately, in Perl

Re: Writing functions like MAP

2010-07-07 Thread Srinivasa Chaitanya T
Thanks that solves the my question. Also I want a write function similar to "map" for hash. I can use map itself for that, but I have to refer the hash variable name in code block. How I write without referring the variable? my %as; my %bs; $as {'one'} = 1; $as {'two'} = 2; $as {'three'} = 3; $as

Re: Writing functions like MAP

2010-07-06 Thread Uri Guttman
> "SCT" == Srinivasa Chaitanya T writes: SCT> How can I write functions which accept block as an argument? SCT> Basically I want to create a function with like which just SCT> executes the block and doesn't create an array. this is one of the few places where perl's prototypes are use