Help for this page

Select Code to Download


  1. or download this
    WORKING 
    #!/usr/bin/perl 
    ...
    $string =~ /$word\s*?(\S+)/;
    my $next_word = $1;
    print "The next word after $word is $next_word\n";
    
  2. or download this
    NOT WORKING 
    
    ...
    
    The next word after info is John
    The next word or number after John is