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
Answer / kiruthikau
Refer this program.
[code]
my $ref=[1,2,3,4];
print ref $ref;
[/code]
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
what are the two ways to get private values inside a subroutine or block?
what r the different type of function in perl ???
Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?
write a Perl script to find a particular word in a paragraph???
What is a perl references?
How do I print the entire contents of an array with Perl?
What's the difference between /^Foo/s and /^Foo/?
What is goto statement in perl?
How to code in perl to implement the tail function in unix?
How do I read command-line arguments with Perl?
What is grep used for in perl?
If you want to empty an array then how would you do that?