Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: natural language sentence construction

by dimmesdale (Friar)
on Jun 17, 2001 at 20:10 UTC ( #89175=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $i (0..$#$types) {
        if ($i && $i == $#$types) {
    ...
        } elsif ($i) {
                    $sentence .= ', ';
                }
    
  2. or download this
    for(@$types) {
        if($_ eq $types->[-1]) {
            $sentence .= $matches>1 ? ' and ' : ' or '
        } else { $sentence .= ', ' }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89175]
help
Chatterbox?
Discipulus i really need my private version of log2ban..

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-06-26 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (577 votes). Check out past polls.