From: Bertram Scharpf Date: 2009-06-12T20:18:15+09:00 Subject: Re: How to set $_ in a method? Hi, Am Freitag, 12. Jun 2009, 16:45:51 +0900 schrieb Heesob Park: > I like to set caller's $_ variable in a method, but it did't work for me. > [...] > I noticed $_ is is local to the current scope. > Is it impossible to set the caller's $_ variable in a method without > using binding and eval? $_ has some special meanings in Kernel.gets, Kernel.sub, Regexp#~ etc. This comes in handy for -ne/-pe option oneliners. You shouldn't use it outside that (if you don't know what you do). Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de