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 many types of primary data structures in Perl and what do they mean?
Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)
How to turn on Perl warnings? Why is that important?
What is the purpose of redo statement?
How to open and read data files with Perl
What are the arguments and what do they mean in perl programming?
Is perl a case sensitive language?
What is q (single q) operator in perl?
What are the advantages of perl programming?
What is the difference between use and require in perl?
What are the various advantages and disadvantages of perl?
How can I display all array element in which each element will display on next line in perl ?
Explain ivalue in perl?
What $! In perl?
How to dereference a reference?