in reply to Chomping most of a _long_ text string
use strict; use warnings; my $u = 70; # Number of underscores my $t = join '',<DATA>; substr($t,0,index($t,"\n".'_'x$u."\n")+$u+2) = ''; print $t; __DATA__ Junk data goes here ______________________________________________________________________ Useful data goes here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Chomping most of a _long_ text string
by ihb (Deacon) on May 29, 2005 at 18:37 UTC |