in reply to upper/lowercase search/replace

Everything but filehandles? Good luck. You would need a full out parser for that. Even if you had a hash ref of good handles it would still mess those keys up inside of quoted strings. If all you are concerned with is having everthing lower case, forget the handles and do the entire thing with a $_ = lc( $_ );. Lowercase filehandles work to (although they look awful. Also, use use IO::File instead of handles and then you really won't have to worry about your filehandles.

Ooops, that brings up a good point, you forgot about package declarations, if you are using any other modules (making good use of code reuse), you will mess them up as well.

By the way, what are you doing this for, the problem might spell a different solution.

Replies are listed 'Best First'.
Re: Re: upper/lowercase search/replace
by Prince99 (Scribe) on Apr 16, 2001 at 20:16 UTC
    The reason I am doing this is purely a learning experience. A couple of perl script written by a previous employee has upper and lowercase variables. It would seem they are at random.
    (EX.  Claim_Number,  group_number, AWK, PMI, amount_Billed, ...). There seems to be very little rhyme or reason to it. He did however put filehandlles in all uppercase. I was just going over some of his files and wanted to make them more like the shop standard.(all lowercase unless it is a filehandle and filehandles must be at least 4 characters. Thanks for the advice and I will check out IO::File.

    Prince99

    Too Much is never enough...
      Probably what you should do instead is just try to lowercase the variables... words starting in $ % $# @... of course, no matter what you do... its gonna be tough to get it to work 100%
                      - Ant