Hello --

On Thu, 22 Nov 2001, Jos Backus wrote:

> Yeah, I came up with
>
>     x, ext, ext2 = mbox.split('-')
>
> to do this. But I'm looking for a replacement in the succinct
>
>     ($ext) = $mbox =~ /.*?-(.+)$/;
>     ($ext2) = $ext =~ /.*?-(.+)$/;
>
> in my Perl code, cookbook-style if you will.  So far I haven't been able to
> come up with an equally short equivalent in Ruby, which of course doesn't mean
> it can't be done :)

Isn't your #split version shorter than the Perl version?


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav