Help for this page

Select Code to Download


  1. or download this
    sub nthword {
      my ($texttomatch, $fieldnum) = @_;
      ($texttomatch =~ 
       m/\s*(\S+)\s*(\S+)\s*(\S+)\s*(\S+)\s*/)[$fieldnum];
    }
    
  2. or download this
    sub nthword {
      my ($texttomatch, $fieldnum) = @_;
      (split /\s+|^/, $texttomatch)[$fieldnum];
    }
    
  3. or download this
    $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
    split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/