Does Perl have reference type?
Submitted by: AdministratorYes. 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 array
Note that the reference itself is a scalar.
Submitted by: Administrator
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 array
Note that the reference itself is a scalar.
Submitted by: Administrator
Read Online Perl Programming Job Interview Questions And Answers
Top Perl Programming Questions
☺ | How do you give functions private variables that retain their values between calls? |
☺ | How many ways can we express string in Perl? |
☺ | How do you match one letter in the current locale? |
☺ | How do I set environment variables in Perl programs? |
☺ | How to open and read data files with Perl |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |