how to search a unique pattern in a file by using perl hash
map function ??? plz answer me

Answers were Sorted based on User's Feedback



how to search a unique pattern in a file by using perl hash map function ??? plz answer me..

Answer / hemant

I did't got ur answer ..!!
Can u explain it a lil Bit ...

Is This Answer Correct ?    0 Yes 1 No

how to search a unique pattern in a file by using perl hash map function ??? plz answer me..

Answer / vinod mishra

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

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More CGI Perl Interview Questions

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

0 Answers  


List the files in current directory sorted by size ?

0 Answers  


How to find the length of an array in perl?

0 Answers  


What is use of ‘->’ symbol?

0 Answers  


What is the difference between exec and system?

0 Answers  






Can inheritance be used in perl? Explain with the help of an example.

0 Answers  


What is the difference between module and package?

4 Answers   EDS, IBM, Symantec,


What is 'rollback' command in perl?

0 Answers  


What is perl? What is the basic command to print a string in perl?

0 Answers  


What $! In perl?

0 Answers  


Why does Perl not have overloaded functions?

0 Answers  


What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?

0 Answers  


Categories