jays at panix.com
Sun Jan 14 16:48:37 PST 2001
On Sun, 14 Jan 2001, Ben Brockert wrote:
> Could one of you geniuses give me a hand?
> I have a scalar, lets call it $foo. Sample text in foo could be
> BAR H
> BAZ BIM
> I want to take that, do some magic regexp stuff on it, and end up with
> Bar H
> Baz Bim
> (this is a scalar, not an array, those are different samples, not
> different elements).
> So far, the closest I have gotten is something like this:
> which yield the same output:
> Bar h
> Baz bim
> Any bright ideas?
> My perl is ugly.
> And why did TPGTB put ucfirst() in when tr/^[a-z]/[A-Z]/ does the same?
At the GOOPS prompt do
> (define capitalize-file
(lambda (in-file-name out-file-name)
(ftlol in-file-name)) out-file-name)))
> (capitalize-file "BIZARRO" "Bizarro")
More information about the Crackmonkey