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

How many loop control keywords are there in perl?

0 Answers  


Explain strftime() function in perl?

0 Answers  


Explain lists and ivalue?

0 Answers  


how to install a package in perl ????

2 Answers  


what is CPAN?

0 Answers  






Explain the different types of data perl can handle.

0 Answers  


How to get help for perl?

0 Answers  


Explain '->' in perl?

0 Answers  


What is the difference between use and require in perl?

0 Answers  


What is the difference between single (') and double (") quote in a string in perl?

0 Answers  


What?s your favorite module and why?

3 Answers  


What are the various flags/arguments that can be used while executing a perl program?

0 Answers  


Categories