#!/usr/bin/perl -w
use strict;
die "Usage: $0 directory\n" unless @ARGV > 0;
use File::Find; use File::MMagic;
my $mm = File::MMagic->new; find sub { return if -d $_ or -l $_; my $type = $mm->checktype_filename($_); return unless $type =~ /gif/i; print "$File::Find::name: $type\n"; }, @ARGV;
On 22 Feb 2004, at 14:52, John wrote:
Hehe, MAC OS your script seems to be working perfectly.
Thank you for your help!
Thanks to Randal L. Schwartz it's his script slightly modified..
http://www.google.com/search?site=swr&hl=en&lr=&ie=ISO-8859 -1&q=site%3Astonehenge.com++File%3A%3AMMagic&btnG=Google+Search
Or stick this in google!
site:stonehenge.com File::MMagic
IMHO - Everyone should read all these: http://www.stonehenge.com/merlyn/columns.html
After having read Learning Perl 3rd Edition
Thanks Randal !!!
Jerry
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>