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 the steps involved when the cgi program starts running?

908


Explain lists ?

921


Explain goto label, goto name, and goto expr?

913


What is the use of "stderr()"?

1014


In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?

899


How does a “grep” function perform?

1018


Demonstrate subroutines in perl with a simple example.

848


How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.

2224


What is the use of now constructor in perl?

963


How to merge two arrays in perl?

1036


What are perl variables?

915


what is the difference between java and cgi?

1062


What is the peculiarity of returning values by subroutines in perl?

905


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

911


List the operator used in Perl?

969