home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
languages
/
perl
/
perl-4.036
/
atarist
/
test
/
binhandl
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1993-02-08
|
328 b
|
16 lines
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);
}