Help for this page

Select Code to Download


  1. or download this
    my $str = "This is a line # with comment";
    my $word = '#';
    ...
    }
    __OUTPUT__
    #
    
  2. or download this
    my $str = "This is a line # with comment Boss.";
    my $word = "#";
    ...
    while ($str =~ /(\S+)/g) {
        print "$1\n";
    }