[Chicago-talk] removing line from file.
Jim Thomason
thomasoniii at gmail.com
Wed Mar 9 11:42:46 PST 2005
Oh, hey, I'll be, that does work. Didn't realize that was one of the
many funky shortcut notations.
-Jim....
On Wed, 9 Mar 2005 13:41:42 -0600, Jim Thomason <thomasoniii at gmail.com> wrote:
> > # ignore first 4 lines
> > next if 1 .. 4;
>
> I believe that should be:
>
> next if $. == 1 .. $. == 4;
>
> 1..4 won't work, since both 1 and 4 are true values, it never hits the 'next'.
>
> -Jim....
>
> > # do whatever you want w/ other lines
> > ...
> > # reset $. - line number for multiple files
> > close ARGV if eof;
> >
> > } # while <>
> >
> > so, you could do:
> > behead.pl file1 file2 file3
> >
> > Outputting to separate files is left as AEFTR or another email. Is this
> > what you where asking?
> >
> > a
> >
> > Andy Bach, Sys. Mangler
> > Internet: andy_bach at wiwb.uscourts.gov
> > VOICE: (608) 261-5738 FAX 264-5932
> >
> > In 1968 it took the computing-Power of 2 C-64 to fly a rocket to the moon.
> > Now, 1997 it takes the Power of a Pentium 133 to run Microsoft Windows 95.
> > Something must have gone wrong.
> > _______________________________________________
> > Chicago-talk mailing list
> > Chicago-talk at pm.org
> > http://mail.pm.org/mailman/listinfo/chicago-talk
> >
>
More information about the Chicago-talk
mailing list