sashac88 has asked for the wisdom of the Perl Monks concerning the following question:
As you see I'm trying to delete first 15 lines from each file.@ARGV=glob "exa*.txt"; $^I=".bak"; while (<>) { if ($.<15) { s/^.*$//; } else { print; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: editing files with (<>)
by Aristotle (Chancellor) on Dec 21, 2004 at 08:03 UTC | |
by Skeeve (Parson) on Dec 21, 2004 at 09:19 UTC | |
by Aristotle (Chancellor) on Dec 21, 2004 at 09:43 UTC | |
|
Re: editing files with (<>)
by Skeeve (Parson) on Dec 21, 2004 at 08:06 UTC | |
by tbone1 (Monsignor) on Dec 21, 2004 at 15:04 UTC | |
|
Re: editing files with (<>)
by ysth (Canon) on Dec 21, 2004 at 08:03 UTC | |
by Aristotle (Chancellor) on Dec 21, 2004 at 08:05 UTC | |
|
Re: editing files with (<>)
by runrig (Abbot) on Dec 21, 2004 at 07:50 UTC |