in reply to line break after 64 characters

$string="This is sample text This is sample text This is sample text T +his is sample text This is sample text This is sample text This is sa +mple text This is sample text "; $string =~ s/(.{64})/$1\n/g; print $string;