Help for this page

Select Code to Download


  1. or download this
    $trans[int(rand($#trans + 1))]
    
  2. or download this
    sub pick
    {
    ...
      return $aref->[int(rand(scalar(@$aref)))];
      
    }
    
  3. or download this
    my %parts = ( 
                 det =>        
    ...
                 properNoun => 
                 [qw{Alpesh Ann China Beijing}], # proper noun
                 ...
    
  4. or download this
      $parts{adj}->[1]
    
  5. or download this
      pick($parts{adj});
    
  6. or download this
    sub createNP{
      my(@adjp);
    ...
        {
          $randnum = int(rand(2)+1);
          if ($randnum == 1)
    
  7. or download this
    sub createNP{
    
    ...
        {
          my $innerRN = int(rand(2)+1);
          if ($innerRN == 1)
    
  8. or download this
    $np[$counter] = $pluralNoun[int(rand($#pluralNoun + 1))];
    
  9. or download this
     push(@np , $pluralNoun[int(rand($#pluralNoun + 1))])