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
What happens when you return a reference to a private variable?
Why is it hard to call this function: sub y { "because" } ?
If you want to empty an array then how would you do that?
How do I sort a hash by the hash value?
what is Perl one liner?
How to get help for perl?
What are the different instances used in cgi overhead?
What value is returned by a lone `return;’ statement?
Explain goto label, goto name, and goto expr?
What is chomp() operator/function?
Write an example explaining the use of symbol tables.
What does -> symbol indicates in Perl?
What is the difference between single (') and double (") quote in a string in perl?
How to print escaping characters inside a string in perl?
Elaborate on perl bite-wise operators.