[Israel.pm] matching in line (fwd) on behalf of Ernst, Yehuda.B

Shlomo Yona shlomo at cs.haifa.ac.il
Thu Dec 2 06:59:09 PST 2004


---------- Forwarded message ----------
Date: Thu, 2 Dec 2004 16:32:27 +0200
From: "Ernst, Yehuda" <yernst at nds.com>
Subject: matching in line


Hello!

I need to read a text file line by line and check every line if it has 5 same chars together in it.

if the file looks like this

lksdjvhhgaeifgas;dfjnafb
dlsjfhgq30874riwufh;wdofia
jsg55555dsbafoiewury20348r7y2-3495

only line 3 will be printed

is there a fast way using pattern match to do it?


thanks
Yehuda Ernst



More information about the Perl mailing list