The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MYDan::Util::File

SYNOPSIS

SYNOPSIS

 my $file = MYDan::Util::File->new( '/etc/passwd' );

 $file->munge( regex => qr/^foo\b/, length => 1, lazy => 1 )->commit();

METHODS

munge( %param )

 seek: 'set' or 'end'
 offset: number of lines from seek position
 length: number of lines to remove
 regex: a regular expression
 lazy: default to end of file if regex match failed
 line: a set of lines

commit( %param )

 path: alternative path to commit
 backup: back up original file