How to make the following assignment, as arrayreference
assignment ?

my $arr_ref='[1,2,3,4,4,'elem']';

Answers were Sorted based on User's Feedback



How to make the following assignment, as arrayreference assignment ? my $arr_ref='[1,2,3,4,..

Answer / kiruthikau

Refer this program.
[code]
my $ref=[1,2,3,4];
print ref $ref;
[/code]

Is This Answer Correct ?    0 Yes 0 No

How to make the following assignment, as arrayreference assignment ? my $arr_ref='[1,2,3,4,..

Answer / kiruthikau

my $ref=[1,2,3,4];
print ref $ref;

ref will return the type of reference.
In this case ref will return as 'ARRAY'.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

what are the two ways to get private values inside a subroutine or block?

0 Answers  


what r the different type of function in perl ???

1 Answers   ABC, Symphony,


Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?

0 Answers  


write a Perl script to find a particular word in a paragraph???

1 Answers  


What is a perl references?

0 Answers  






How do I print the entire contents of an array with Perl?

0 Answers  


What's the difference between /^Foo/s and /^Foo/?

0 Answers  


What is goto statement in perl?

0 Answers  


How to code in perl to implement the tail function in unix?

0 Answers  


How do I read command-line arguments with Perl?

0 Answers  


What is grep used for in perl?

0 Answers  


If you want to empty an array then how would you do that?

0 Answers  


Categories