use strict; use File::Find; @ARGV = '.' unless @ARGV; find sub { return if -d; unlink $_ if /\.avi$/ or /\.mp3$/ or /\.mp2$/ or /\.mpeg$/; }, @ARGV;