use File::Remove qw(remove); # removes (without recursion) several files remove qw( *.c *.pl ); # removes (with recursion) several directories remove \1, qw( directory1 directory2 ); # removes (with recursion) several files and directories remove \1, qw( file1 file2 directory1 *~ ); # trashes (with support for undeleting later) several files trash qw( *~ );