blob: 6f62f4d6cc7f55fe39c2b8928903cf59b743ec3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
die "Usage: binhandl files ...\n" if $#ARGV < $[;
NEXTFILE:
while ($FILEHAND = shift) {
unless (open(FILEHAND)) {
printf STDERR "Can't open \"$FILEHAND\"\n";
next NEXTFILE;
}
if (-B FILEHAND) {
print "\"$FILEHAND\" is binary\n";
} else {
print "\"$FILEHAND\" is text\n";
}
close(FILEHAND);
}
|