Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.

2191


Comment on data types and variables in perl.

880


What does undef function in perl?

891


You want to empty an array. How would you do that?

853


Explain the meaning of perl one-liner?

1002


How do you turn on the perl warnings?

862


What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

899


What is the use of command “use strict”?

962


What is the use of -w, -t and strict in Perl?

944


How do you set environment variables in perl?

981


Explain subroutine?

865


What does `new $cur->{LINK}' do? (Assume the current package has no new() function of its own.)

895


How to renaming a file in perl programming?

986


What is the importance of perl warnings? How do you turn them on?

995


What are the different instances used in cgi overhead?

935