in reply to Re: Making a title/headline
in thread Making a title/headline
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 $word (@wordlist) { if (!grep {$_ eq $word} @wordlist) { ucfirst ($word); print $word; } return join(' ', @wordlist); } }
Still just returns blank. With -w and 'use strict' it bitches about using ucfirst in void context. What am I missing here?
Kickstart
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Updated code...
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 | |
|
Giving up on ucfirst.
by Kickstart (Pilgrim) on Dec 15, 2001 at 04:24 UTC |