#!/usr/bin/perl use strict; use warnings; open my $fh, '<', \<<EOF; Title 1 Line of text A Line of text B Title 2 Line of text C Title 3 Title 4 Line of text D EOF { local $/; print reverse <$fh> =~ /(^Title(?:(?!^Title).)*)/msg; }
In reply to Re: How to reorder a text file
by Cristoforo
in thread How to reorder a text file
by hennesse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |