#!/usr/local/bin/perl $input = $ARGV[0]; open(thefile,"$input"); @file = <thefile>; close thefile; open(newfile,">$input"); $counter = 0; foreach $line(@file) { $counter++; if ($counter != 1) { $line =~ s/\s+$//; $line =~ s/^\s+//; } print newfile "$line"; } close newfile;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: famous one liners
by myocom (Deacon) on Oct 28, 2000 at 02:20 UTC | |
by Octavian (Monk) on Oct 30, 2000 at 20:06 UTC | |
|
Re: famous one liners
by TomDLux (Vicar) on Dec 07, 2005 at 16:36 UTC |