Amit Saxena wrote:
Hi all,
Hello,
How to determine the file type of a file passed as an input to the perl program ? I want to have the same output as it's shown by "file" command in UNIX.
"file" uses a database called /etc/magic to determine the file type. Although on my system it is located at /usr/share/file/magic.
man 5 magic Perl has the File::MMagic module to read and interpret this file. John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/