Project

General

Profile

Actions

Feature #8859

closed

Possibility to declare local varibles like "my" in Perl

Added by bdimych (Dmitry Bolshakov) about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:57006]

Description

Hi
I think it would be useful to have an analogue of the "my" keyword in Perl
e.g.
x = 'outer value'
p = Proc.new {
...
many code here
...
my x = 'local value does not affect outer variable'
}
I know I can declare local variables in the beginning of the block with a semicolon |;x|
but imho special keyword would be more handy

Actions

Also available in: Atom PDF

Like0
Like0