Programming Languages C# Subjective
Mar 14, 2013

What is use of ‘->’ symbol?

Detailed Explanation

In Perl, ‘->’ symbol is an infix dereference operator. if the right hand side is an array subscript, hash key or a subroutine, then the left hand side must be a reference.

@array = qw/ abcde/; # array
 
print "n",$array->[0]; # it is wrong
 
print "n",$array[0]; #it is correct , @array is an array

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback