PhilFromIndy has asked for the wisdom of the Perl Monks concerning the following question:
open(INPUT,"filename.txt") or die "Will not open input: $!"; open(OUTPUT,">output.txt"); or die "Will not open output: $!"; my $input = <INPUT>; my $line; my $i; my $length = length($input); for ($i=0; $i<$length; $i=$i+164){ $line = substr($input,$i,164); print "$line\n"; #Output to screen to make sure it works print OUTPUT "$line\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dealing with huge text string
by BrowserUk (Patriarch) on Mar 28, 2008 at 13:25 UTC | |
by jwkrahn (Abbot) on Mar 28, 2008 at 13:32 UTC | |
by PhilFromIndy (Initiate) on Mar 28, 2008 at 14:03 UTC | |
by mobiusinversion (Beadle) on Mar 28, 2008 at 19:28 UTC | |
|
Re: Dealing with huge text string
by ikegami (Patriarch) on Mar 28, 2008 at 13:54 UTC | |
|
Re: Dealing with huge text string
by locked_user sundialsvc4 (Abbot) on Mar 28, 2008 at 13:42 UTC | |
|
Re: Dealing with huge text string
by mobiusinversion (Beadle) on Mar 28, 2008 at 19:16 UTC | |
by BrowserUk (Patriarch) on Mar 28, 2008 at 19:33 UTC | |
by mobiusinversion (Beadle) on Mar 29, 2008 at 07:02 UTC | |
by BrowserUk (Patriarch) on Mar 29, 2008 at 09:15 UTC |