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

Why to use perl scripting?

1005


Explain the internal working of cgi

925


What is the purpose of “_file_ literal” and “_line_ literal” in perl?

918


You want to add two arrays together. How would you do that?

881


What does redo statement do in perl?

1036


How can I display all array element in which each element will display on next line in perl ?

932


Explain strftime() function in perl?

944


How to know whether a key exists or not in perl?

982


When does circular reference occur?

909


How will you open a file in read-only mode in perl?

907


How to dereference a reference?

985


What is the difference between die and exit in perl?

1002


How to create a directory in perl?

1076


What is qq (double q)operator in perl?

1018


In Perl, what is grep function used for?

1079