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 know whether a key exists or not in perl?

1016


What is the use of 'ne' operator?

1051


Write a script to reverse a string without using perl's built in functions?

1033


what is the function that is used to identify how many characters are there in a string?

1002


what is CPAN?

1044


How will you access an element of a perl array?

987


You want to connect to sql server through perl. How would you do that?

987


What is the different between array and hash in perl programming?

986


What does last statement do in perl?

1064


Define perl scripting?

1028


Explain goto label, goto name, and goto expr?

967


Differences between die and exit.

1032


Can you add two arrays together?

982


Demonstrate subroutines in perl with a simple example.

916


What is “grep” function in perl?

1067