#!/usr/bin/perl -pi.orig BEGIN {$value_to_delete = } undef $_ if $_ eq $value_to_delete;