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

What happens when you return a reference to a private variable?

937


Why is it hard to call this function: sub y { "because" } ?

874


If you want to empty an array then how would you do that?

1031


How do I sort a hash by the hash value?

867


what is Perl one liner?

857


How to get help for perl?

935


What are the different instances used in cgi overhead?

924


What value is returned by a lone `return;’ statement?

1003


Explain goto label, goto name, and goto expr?

879


What is chomp() operator/function?

993


Write an example explaining the use of symbol tables.

901


What does -> symbol indicates in Perl?

919


What is the difference between single (') and double (") quote in a string in perl?

902


How to print escaping characters inside a string in perl?

841


Elaborate on perl bite-wise operators.

849