#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11119669 use warnings; my $slurp; while (<DATA>) { $slurp .= $_; } $slurp =~ s/^##.*\n\z//m; print $slurp; __DATA__ kjkjksjdf ## Don't del me blah ## deleteme
In reply to Re: Delete last line of file with regex
by tybalt89
in thread Delete last line of file with regex
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |