How to make the following assignment, as arrayreference
assignment ?
my $arr_ref='[1,2,3,4,4,'elem']';
Answer Posted / 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 View All Answers
How to know whether a key exists or not in perl?
What is the use of 'ne' operator?
Write a script to reverse a string without using perl's built in functions?
what is the function that is used to identify how many characters are there in a string?
what is CPAN?
How will you access an element of a perl array?
You want to connect to sql server through perl. How would you do that?
What is the different between array and hash in perl programming?
What does last statement do in perl?
Define perl scripting?
Explain goto label, goto name, and goto expr?
Differences between die and exit.
Can you add two arrays together?
Demonstrate subroutines in perl with a simple example.
What is “grep” function in perl?