-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
How should I do to split a long string that the only thing I know is
that is a multiple of a previous defined number (for example 26).
A graphic example:
From: papapep [EMAIL PROTECTED]
How should I do to split a long string that the only thing I know is
that is a multiple of a previous defined number (for example 26).
A graphic example:
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr
Papapep wrote:
How should I do to split a long string that the only thing I know is
that is a multiple of a previous defined number (for example 26).
A graphic example:
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
That's four
Jenda Krynicky wrote:
while ($long_string ne '') {
my $chunk = substr( $long_string, 0, 26);
substr( $long_string, 0, 26) = '';
Or just:
my $chunk = substr( $long_string, 0, 26, '' );
But that is inefficient because you modify the beginning of the string
on each
John W. Krahn wrote:
Papapep wrote:
How should I do to split a long string that the only thing I know is
that is a multiple of a previous defined number (for example 26).
A graphic example:
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx
David --- Senior Programmer Analyst --- Wgo Wagner wrote:
You might look at sysopen, sysread which allows you to read in max
blocks of data and process that data.
It would look something like:
sysopen(FILEIN,$filein,0) || die unable to open file $filein: $!;