in reply to string length problems

It's not clear what you are trying to do, but length or substr would probably help.

Replies are listed 'Best First'.
Re: Re: string length problems
by Anonymous Monk on Jan 23, 2004 at 10:44 UTC
    This is the line where i split the string at a user defined value ($window).
    $seq =~ s/(.{$window})/$1\n/g;
    who can I split this the same using substr?
      for (my $pos = $window; $pos <= length($seq); $pos += $window+1) { substr($seq, $pos, 0, "\n"); }
      is the least ugly I could come up with.