From: matz@... (Yukihiro Matsumoto) Date: 2002-12-11T10:07:08+09:00 Subject: Re: Two Perl -> Ruby Questions Hi, In message "Two Perl -> Ruby Questions" on 02/12/11, "Austin Ziegler" writes: |1. What is the equivalent of Perl's eval BLOCK form of eval? Per "man perlfunc": "the code within the block is parsed only once..." Of course, I'm not exactly sure why an eval is being done in the code that I'm looking at, but seeing a Ruby equivalent may help. eval BLOCK is used for exception handling, so that "begin .. rescue .. end" should be the answer. |2. What is the equivalent of Perl's pos SCALAR function? "Returns the offset of where the last m//g search left off for the variable in question.... May be modified to change that offset. Such modification will also influence the \G zero-width assertion in regular expressions." There's no identical feature. Show me the original Perl code. matz.