Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    my $output = "<keyword>" . join ("</keyword>, <keyword>", split /\s*(?
    +:,|;|\&mdash;|&ndash;)\s*/, $input) . "</keyword>";
    
    print $output;
    
  2. or download this
    use strict;
    use warnings;
    ...
    }
    
    print $output;
    
  3. or download this
    while( my($val, $sep) = splice @data, 0, 2 )
    {
        $sep = "" unless $sep;
        $output .= "<keyword>$val</keyword>$sep";
    }