Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print "1-->\n$str<--1\n";
    $str =~ s/\n+\Z//;
    print "2-->\n$str<--2\n";
    
  2. or download this
    1-->
    1
    ...
    1
    2
    3<--2