Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    
    $text =~ s/(.{$num_of_chars}[\w|\(.*\)\w]*).*/$1/;
    print $text;
    
  2. or download this
    use warnings;
    use strict;
    my $text = "   I'd like a foobar(s)!  What about you?";
    ...
    }
    for (@text) { print $_; }