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 is the tk module?

0 Answers  


What is the difference between localtime() and gmtime() functions?

0 Answers  


How to do comment in perl?

0 Answers  


Mention the difference between die and exit in Perl?

0 Answers  


For a situation in programming, how can you determine that Perl is a suitable?

0 Answers  


How can arrays be tied?

0 Answers  


what is Polymorphism in Perl?

0 Answers  


What are some common methods to all handles in perl?

0 Answers  


What are the different instances used in cgi overhead?

0 Answers  


What are the purpose of close(), getc() and read() functions?

0 Answers  


List the files in current directory sorted by size ?

0 Answers  


What are perl variables?

0 Answers  


Categories