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

What purpose does each of the following serve: -w, strict, - T ?

2 Answers  


What are different data types that perl supports. Elaborate on them.

0 Answers  


What is posix in perl?

0 Answers  


Why is it hard to call this function: sub y { "because" } ?

0 Answers  


How does polymorphism work in perl?

0 Answers  






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

0 Answers  


while(my($key, $value) = each(%hash) ) { print "$key => $value\n"; } my($key, $value); while(($key, $value) = each(%hash) ) { print "$key => $value\n"; } What is the different between these two code in case of "my" usage ?

1 Answers  


Which guidelines by Perl modules must be followed?

0 Answers  


what are the two ways to get private values inside a subroutine or block?

0 Answers  


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

0 Answers  


What is the main function of cookie server?

0 Answers  


What rules must be followed by modules in perl.

0 Answers  


Categories