Help for this page

Select Code to Download


  1. or download this
    $string="abc de fgh ijkl";
    
    ...
    {
        print "$1 $1\n";
    }
    
  2. or download this
    abc de
    fgh ijkl
    
  3. or download this
    abc de
    de fgh
    fgh ijkl
    
  4. or download this
    $string =~ /([a-z]+) ([a-z]+)\G(?: [a-z])*?/g
    
  5. or download this
    my @words =split $string;
    for($i=0;$i<$#words;$i++)
    {
       print "$words[$i] $words[$i+1]\n";
    }