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 happens in dereferencing?

958


How does a “grep” function perform?

966


Explain grooving and shortening of arrays?

1030


Explain strftime() function in perl?

882


What does init 5 and init 0 do?

951


What is the use of "stderr()"?

958


How many types of operators are used in the Perl?

977


What is the function of cgiwrap in cgi programming?

869


Explain splicing of arrays?

865


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

896


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

868


What is it meants by '$_'?

859


what is the main function of fork() in cgi programming?

1036


Comment on data types and variables in perl.

876


For a situation in programming, how can you determine that Perl is a suitable?

834