http://qs321.pair.com?node_id=700908


in reply to ASCII insert after read

An easier way to test for the ASCII character 12 is to use a regex:
if ($line =~ m/\014/) { # $line contains a Control-L }
Update: I guess your approach can work, but it's a little awkward. You are comparing the octal representation of a number (which is a string) to a decimal value. Doing it your way I would have written it:
$test = sprintf("%o", ord $_); if ($test eq "14") { ... }