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 does the q{ } operator do?
What are the advantages of c over Perl?
Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?
How to open and read data files with Perl
Explain lists in perl?
You want to connect to sql server through perl. How would you do that?
What is a hash?
6 Answers Photon, Satyam, Wipro,
What is a perl references?
How to read file into hash array ?
Give an example of the -i and 0s option usage.
How to start perl in interactive mode?
Write a script for 'count the no.of digits using regular expressions in perl..