Help for this page

Select Code to Download


  1. or download this
    my $len = 20;
    # 345678901234567890
    ...
    <Eight Nine Ten>
    <Eleven Twelve>
    <Thirteen Fourteen>
    
  2. or download this
    use Text::Wrap;
    $Text::Wrap::columns = 20;
    #$text=~tr/\n/ /;
    print wrap('', '', $text);
    
  3. or download this
    my @lines = $text =~ /(.{1,$len})\s+/gm;