What is -> symbol in perl?



What is -> symbol in perl?..

Answer / Braham Dev Roy

In Perl, the `->` operator is used for arrow arithmetic or to dereference a reference. Here's an example:n```perlnmy $reference = [1, 2, 3];nmy $value = $$reference ->[0]; # Equivalent to my $value = $reference->[0]

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

How would you replace a char in string and how do you store the number of replacements?

2 Answers  


Why to use perl?

1 Answers  


what is Perl one liner?

1 Answers  


Explain the default scope of variables in perl?

1 Answers  


Explain chop?

1 Answers  


Consider the following example #! /bin/perl use strict; sub sample { my @arr=(1,2,3,4); return @arr; } my ($a,$b,$c,$d) = &sample; print "$a\n$b\n$c\n$d\n"; In the above code, How can I get the $c without using the arguments such as $a,$b. I don't want to use any array to get the return values.

2 Answers  


how to find a substring in a string without using substr built in functions, and print the substring found

3 Answers   Nokia,


What is subroutine in perl?

1 Answers  


Which guidelines by Perl modules must be followed?

1 Answers  


Explain the difference between "my" and "local" variable scope declarations. ?

1 Answers   HCL,


What are the benefits of perl in using it as a web-based application?

1 Answers  


How to create a directory in perl?

1 Answers  


Categories