while (<>) { chomp; my ($old, $new) = split(' --> ', $_, 2); unless (rename $old, $new) { warn "unable to rename $old to $new: $!\n"; } }