Does Perl Have Reference Type

  • 25 Feb, 2012

    Yes. Perl can make a scalar or hash type reference by using backslash operator.For example$str = "here we go"; # a scalar variable$strref = $str; # a reference to a scalar@array = (1..10); # an array$arrayref = @array; # a reference to an arrayNote that the reference itself is a scalar.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 All rights reserved.