#!/usr/local/bin/perl -w use strict; use Getopt::Std; use Pod::Usage; use Sysadm::Install qw(:all); use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($DEBUG); my $MAX_LEN = 50; for my $file (<*>) { if(length $file > $MAX_LEN) { my $yn = ask "Delete $file [y]/n", "y"; rmf $file if $yn =~ /y/i; } } __END__ =head1 NAME dellong - Delete files/directories with long names in current dir =head1 DOWNLOAD _SRC_HERE_ =head1 SYNOPSIS dellong =head1 DESCRIPTION C deletes files and directories with names longer than 20 characters in the current directory after confirmation. =head1 LEGALESE Copyright 2006 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR 2006, Mike Schilli