in reply to regex and sysread

If I were to venture a guess, you're trying to read lines from a text file, and you want to apply regular expressions to those lines.

sysread() is for reading binary data and you don't want buffering etc. to get in the way.

If you just want to read lines of text, use a simpler form such as

open($fh, $fname) || die $!; while (my $line = <$fh>) { # Do something with each $line... } close $fh;
-- Time flies when you don't know what you're doing