Kickstart has asked for the wisdom of the Perl Monks concerning the following question:
sub make_a_title { my @nocapslist = ( 'in', 'and', 'the', 'for', 'it', 'but', 'to', 'with', 'about', 'or', 'nor', 'because', 'as', 'that' ); my @wordlist = split (/\s+/, $_[0]); ucfirst $wordlist[0]; foreach my $word (@wordlist) { if !(grep {$word} @wordlist) { ucfirst $word; } return join(' ', @wordlist); }
Kickstart
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Making a title/headline
by Ovid (Cardinal) on Dec 15, 2001 at 04:27 UTC | |
by Kickstart (Pilgrim) on Dec 15, 2001 at 04:33 UTC | |
by Ovid (Cardinal) on Dec 15, 2001 at 04:38 UTC | |
by strat (Canon) on Dec 17, 2001 at 18:50 UTC | |
|
Re: Making a title/headline
by dws (Chancellor) on Dec 15, 2001 at 03:49 UTC | |
by Kickstart (Pilgrim) on Dec 15, 2001 at 04:00 UTC | |
|
Re: Making a title/headline
by lestrrat (Deacon) on Dec 15, 2001 at 03:53 UTC | |
by Kickstart (Pilgrim) on Dec 15, 2001 at 04:09 UTC | |
by lestrrat (Deacon) on Dec 15, 2001 at 04:23 UTC | |
by Kickstart (Pilgrim) on Dec 15, 2001 at 04:25 UTC | |
by lestrrat (Deacon) on Dec 15, 2001 at 04:33 UTC | |
by Kickstart (Pilgrim) on Dec 15, 2001 at 04:24 UTC | |
by strat (Canon) on Dec 17, 2001 at 18:45 UTC |