Find and convert to UC

Discussion in 'Perl Misc' started by Chris Newman, Jul 25, 2006.

  1. Chris Newman

    Chris Newman Guest

    I have 1500 records in a file.

    I know how to read the file EOF etc

    Here is a typical record

    Barkell, William James ps Lone Pine Gardens, Reid


    I want to convert the first occurrence of a mixed case word to all upper
    case. Could someone oblige please. Have tried the substitution but it good
    at finding the word but not at handling the replacement of individual letters
    which I require
     
    Chris Newman, Jul 25, 2006
    #1
    1. Advertising

  2. Chris Newman wrote:
    > I want to convert the first occurrence of a mixed case word to all
    > upper case. Could someone oblige please. Have tried the substitution
    > but it good at finding the word but not at handling the replacement
    > of individual letters which I require


    No replacement of individual letters necessary. See "perldoc -f upper".
    Second major advantage: if handles _all_ characters correctly, even those
    you do not know because they are not used in your country/language/culture.

    jue
     
    Jürgen Exner, Jul 25, 2006
    #2
    1. Advertising

  3. Jürgen Exner wrote:
    > Chris Newman wrote:
    >> I want to convert the first occurrence of a mixed case word to all
    >> upper case. Could someone oblige please. Have tried the substitution
    >> but it good at finding the word but not at handling the replacement
    >> of individual letters which I require

    >
    > No replacement of individual letters necessary. See "perldoc -f
    > upper". Second major advantage: if handles _all_ characters


    Sorry, brain fart.
    Make that "perdoc -f uc", of course.

    jue
     
    Jürgen Exner, Jul 25, 2006
    #3
  4. Chris Newman

    Chris Newman Guest

    On Tue, 25 Jul 2006 14:01:55 +1000, Jürgen Exner wrote
    (in article <TIgxg.7944$yN3.214@trnddc04>):

    > Jürgen Exner wrote:
    >> Chris Newman wrote:
    >>> I want to convert the first occurrence of a mixed case word to all
    >>> upper case. Could someone oblige please. Have tried the substitution
    >>> but it good at finding the word but not at handling the replacement
    >>> of individual letters which I require

    >>
    >> No replacement of individual letters necessary. See "perldoc -f
    >> upper". Second major advantage: if handles _all_ characters

    >
    > Sorry, brain fart.
    > Make that "perdoc -f uc", of course.
    >
    > jue
    >
    >



    Thanks Jurgen, Must be lost in translation. Here is Australia i*brain fart *
    is not complimentary :)
     
    Chris Newman, Jul 25, 2006
    #4
  5. Chris Newman wrote:
    > On Tue, 25 Jul 2006 14:01:55 +1000, Jürgen Exner wrote
    > (in article <TIgxg.7944$yN3.214@trnddc04>):
    >
    >> Jürgen Exner wrote:
    >>> Chris Newman wrote:
    >>>> I want to convert the first occurrence of a mixed case word to all
    >>>> upper case. Could someone oblige please. Have tried the
    >>>> substitution but it good at finding the word but not at handling
    >>>> the replacement of individual letters which I require
    >>>
    >>> No replacement of individual letters necessary. See "perldoc -f
    >>> upper". Second major advantage: if handles _all_ characters

    >>
    >> Sorry, brain fart.
    >> Make that "perdoc -f uc", of course.

    >
    > Thanks Jurgen, Must be lost in translation. Here is Australia
    > i*brain fart * is not complimentary :)
     
    Jürgen Exner, Jul 25, 2006
    #5
  6. Chris Newman wrote:
    > On Tue, 25 Jul 2006 14:01:55 +1000, Jürgen Exner wrote
    >> Jürgen Exner wrote:
    >>> No replacement of individual letters necessary. See "perldoc -f
    >>> upper". Second major advantage: if handles _all_ characters

    >>
    >> Sorry, brain fart.
    >> Make that "perdoc -f uc", of course.

    >
    > Thanks Jurgen, Must be lost in translation. Here is Australia
    > i*brain fart * is not complimentary :)


    It wasn't meant as a compliment. Let me spell it out completely:

    "Sorry, I had a brain fart"

    I hope you didn't read the abbreviated form as an offence that was targeted
    at you.

    jue
     
    Jürgen Exner, Jul 25, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    1,960
    Wesley Hall
    Nov 4, 2006
  2. Harlin Seritt
    Replies:
    29
    Views:
    1,205
    Paul Rubin
    Feb 24, 2007
  3. Wybo Dekker
    Replies:
    1
    Views:
    388
    Yukihiro Matsumoto
    Nov 15, 2005
  4. vdvorkin
    Replies:
    0
    Views:
    433
    vdvorkin
    Feb 10, 2011
  5. vdvorkin
    Replies:
    3
    Views:
    846
    vdvorkin
    Feb 14, 2011
Loading...

Share This Page