in reply to Re: Re: (jeffa) Re: eval and variable scope
in thread eval and variable scope
(This behavior is actually encapsulated in an object, etc.; again, I've just stripped down for simplicity's sake.) Anyway, I got this all working fine initially using closures, and just started trying the eval-string approach as an alternative (TMTOWTDI...) In any case, I appreciate the reminder about do's existence, since it's not something I use with any regularity!%messages = ( file_open_failed => 'unable to open $_[0]: $!', some_other_error => 'had a problem doing $_[0]', ); ... stuff happens ... open (INPUT, $filename) or die interpolate('file_open_failed', $file +name);
|
|---|