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

Why do you use Perl?

0 Answers  


What is automatic error handling in perl?

0 Answers  


What is boolean context?

0 Answers  


How to concatenate strings with perl?

0 Answers  


Mention what is cpan?

0 Answers  






How the interpreter is used in Perl?

0 Answers  


Consider the following example #! /bin/perl use strict; sub sample { my @arr=(1,2,3,4); return @arr; } my ($a,$b,$c,$d) = &sample; print "$a\n$b\n$c\n$d\n"; In the above code, How can I get the $c without using the arguments such as $a,$b. I don't want to use any array to get the return values.

2 Answers  


What is the difference between exec and system?

0 Answers  


What is the difference between perl list and perl array?

0 Answers  


What is the difference between use and require in perl programming?

0 Answers  


I have created a CGI-based page,after entering all the values in to the fields, How to get the output on the web browser using Perl

4 Answers  


Name an instance where you used a CPAN module?

3 Answers   IBM, TCS,


Categories