in reply to 2048 character limit
Along the lines of Ryszard's solution, but it puts the print inside the while, like Beatnik suggested, and breaks long lines:
while (<FH>) { my $templine = $_; while (length $templine > 60) { my $substring = substr ($templine, 0, 60); print "$substring\n"; $templine = substr ($templine, 61); } print "$templine\n"; }
Note that this is untested code, and I am notorius for screwing up indexes in things like substr, so be sure to check for off by one errors.
Scott
Please see my resume;
I am looking for a Bioinformatics Scientist position.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 2048 character limit
by Aristotle (Chancellor) on Jun 06, 2002 at 00:52 UTC | |
by druid (Initiate) on Jun 06, 2002 at 07:49 UTC | |
by Aristotle (Chancellor) on Jun 06, 2002 at 14:41 UTC | |
|
Re: Re: 2048 character limit
by druid (Initiate) on Jun 06, 2002 at 07:50 UTC |