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 many types of primary data structures in Perl and what do they mean?

1407


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

994


How to turn on Perl warnings? Why is that important?

1060


What is the purpose of redo statement?

1010


How to open and read data files with Perl

1046


What are the arguments and what do they mean in perl programming?

995


Is perl a case sensitive language?

1104


What is q (single q) operator in perl?

1082


What are the advantages of perl programming?

991


What is the difference between use and require in perl?

856


What are the various advantages and disadvantages of perl?

896


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

925


Explain ivalue in perl?

973


What $! In perl?

955


How to dereference a reference?

973