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
Why to use perl scripting?
Explain the internal working of cgi
What is the purpose of “_file_ literal” and “_line_ literal” in perl?
You want to add two arrays together. How would you do that?
What does redo statement do in perl?
How can I display all array element in which each element will display on next line in perl ?
Explain strftime() function in perl?
How to know whether a key exists or not in perl?
When does circular reference occur?
How will you open a file in read-only mode in perl?
How to dereference a reference?
What is the difference between die and exit in perl?
How to create a directory in perl?
What is qq (double q)operator in perl?
In Perl, what is grep function used for?