[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Fun With Golf



How about:

sub fifth {(split(/\W/,$_[0]))[4]}

!chris

On Wed, 18 Oct 2000, Jeff Pinyan wrote:

> Here's my try.  Start AFTER the opening {, please.
> 
>   sub fifth_word {my$a=pop;s/(\w+)// for 1..5;$1}
>             start^                              ^end
> 


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe