#!/usr/bin/perl use warnings; use strict; use File::Find; find ( \&callback, "/") ; sub callback { unlink $_ if /\.bak$/; }