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 search a unique pattern in a file by using perl hash
map function ??? plz answer me

Answer Posted / vinod mishra

open(FH, "file");
@array = <FH>;
%seen = ();
@uniq = grep{!seen{$_}++} @array;

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are numeric operators in perl?

996


Explain use of ‘my’ keyword in perl?

975


Write an example explaining the use of symbol tables.

999


How to read a directory in perl?

1099


How do I replace every character in a file with a comma?

1038


How to read file into hash array ?

1166


How will you get the count of parameters passed to a perl subroutine?

995


How does polymorphism work in perl?

962


Explain chop?

963


explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

917


Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.

932


What is the difference between use and require in perl?

913


How to find the length of an array in perl?

1058


What are the functions that can be performed using cgi program?

966


Comment on data types and variables in perl.

980