Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Create a temporary value for a ...Declare and assign a package v ... (Berikutnya)
Keywords altering or affecting scoping of identifiers

Declare and assign a local variable (lexical scoping)

Daftar Isi

  • my EXPR

  • my TYPE EXPR
  • my EXPR : ATTRS
  • my TYPE EXPR : ATTRS

    A my declares the listed variables to be local (lexically) to theenclosing block, file, or eval. If more than one value is listed,the list must be placed in parentheses.

    The exact semantics and interface of TYPE and ATTRS are stillevolving. TYPE is currently bound to the use of the fields pragma,and attributes are handled using the attributes pragma, or startingfrom Perl 5.8.0 also via the Attribute::Handlers module. SeePrivate Variables via my() in perlsub for details, and fields,attributes, and Attribute::Handlers.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Create a temporary value for a ...Declare and assign a package v ... (Berikutnya)