[Pdx-pm] oh, gross (object method in regex)

chromatic chromatic at wgz.org
Sun Mar 12 14:49:19 PST 2006

On Sunday 12 March 2006 13:03, Randall Hansen wrote:

> this works:
>      grep /${ \$object->method }/ => @stuff;
> but it looks disgusting.  is there a prettier way to do it?

Are you asking about using the grep BLOCK syntax or something else?  I think I 
need more context to answer your question, because:

	grep { $->method() } @stuff

... is valid code.  Or does the method() call return a regex, as David 

-- c

More information about the Pdx-pm-list mailing list