CGI Perl Question:
How to make the following assignment, as arrayreference assignment?
my $arr_ref=[1,2,3,4,4,elem];
Answer:
my $ref=[1,2,3,4];
print ref $ref;
ref will return the type of reference.
In this case ref will return as 'ARRAY'.
print ref $ref;
ref will return the type of reference.
In this case ref will return as 'ARRAY'.
Previous Question | Next Question |
What is caller function in perl? | Difference between Perl and Mod_perl? |