Help for this page

Select Code to Download


  1. or download this
    #!usr/bin/perl
    use strict;
    use warnings;
    ...
    
    
    =cut
    
  2. or download this
    # and now using \s & /g                 # output smells bad
    
    print "and now using \\s only, with /g modifier\n";
    ...
        $count_s += $linecount_s;
    }
    print "\$count_s: $count_s \n\n";
    
  3. or download this
    and now using \s only, with /g modifier
    $linecount_s: 3, $var after substitution: now_|is_the_time
    $linecount_s: 3, $var after substitution: |for_all_good_men
    $linecount_s: 7, $var after substitution: to_come_to_the_aid_of_their_
    +|party.
    $count_s: 13