Current time: 05-05-2024, 02:32 PM Hello There, Guest! (LoginRegister)


Post Reply 
Line Break in long lines (Seen in folder protection area)
Author Message
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #2
RE: Line Break in long lines (Seen in folder protection area)
i coded something, but i dont know why the for-loop isn't entered

Code:
#!/usr/bin/perl

use strict;

my $completestring;
my $splittedstring;
my $splittedstring2='';
my $splittedstring3='';
my @splitteddataset;
my $datasetsize;
my $lengthnextsplit;

$completestring="asdhkjashdkas,asdhkasdhkasd,asdhklashdkasd,asdhkashdkas,asdhkasdhkasd,asdhkashdk​asd,asdhjashdkasd,asdhjashkdas,123";
$splittedstring=$completestring;

while (length($splittedstring)>30) {
    $splittedstring2 = substr($splittedstring, 0, 30);
    #print "$splittedstring2\n";
    @splitteddataset = reverse split(/,/,$splittedstring2,2);
    my $splittedstring3 = "$splittedstring3\s@splitteddataset[1],\s";

    $lengthnextsplit = length($splittedstring3);
    $splittedstring = substr($splittedstring, $lengthnextsplit,30);
    
}


but i think this should work... when the for-loop sets the string3...


I'd like to have some feedback Wink
(This post was last modified: 01-23-2010 07:19 PM by MasterTH.)
01-23-2010 08:36 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Line Break in long lines (Seen in folder protection area) - MasterTH - 01-23-2010 08:36 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)