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

Explain what is perl language?

0 Answers  


Demonstrate subroutines in perl with a simple example.

0 Answers  


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

2 Answers  


Write the program to process a list of numbers.

0 Answers  


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

0 Answers  






How to copy a file in perl?

0 Answers  


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

0 Answers  


You want to read command-line arguements with perl. How would you do that?

0 Answers  


What is subroutine in perl?

0 Answers  


Write syntax to add two arrays together in perl?

0 Answers  


What do the symbols $ @ and % mean when prefixing a variable?

1 Answers   Barclays,


How do you you check the return code of a command in perl?

0 Answers   HCL,


Categories