Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PerlNewUser

    Best way to add a space between touching Upper & Lowercase Characters?

    Actually, without even re-saving as DOS text, the code seems to be working just fine on the target field -- after adding all fields to an array, and applying the substitution to just the target, i.e: $string=$data[6]; ## data[6] is the target Field in the array. $string =~...
  2. PerlNewUser

    Best way to add a space between touching Upper & Lowercase Characters?

    The code definitely works, just not on that particular field. (It does a terrific job on a URL field but, of course, I don't want to use it there.) I have an additional chance to apply it separately to the target field and, if that does not work, the data is probably full of invisible...
  3. PerlNewUser

    Best way to add a space between touching Upper & Lowercase Characters?

    That was included in the code, but omitted when I copied it to the above reply. This is what I have: $line =~ s/([a-z])([A-Z])/\1\. \2/g; I also applied it with altenate characters, i.e. $line =~ s/([a-z])([A-Z])/\1AAA \2/g; to see of I was simply missing its application, but still...
  4. PerlNewUser

    Best way to add a space between touching Upper & Lowercase Characters?

    You mean this will work as-is? $line=~s/lcUC/lc uc/g;
  5. PerlNewUser

    Best way to add a space between touching Upper & Lowercase Characters?

    Brigmar, thanks. What do the 1 and 2 represent? So far, this is not working for me when used as: $line=s/([a-z])([A-Z])/\1\. \2/g;
  6. PerlNewUser

    Best way to add a space between touching Upper & Lowercase Characters?

    Using something like this: (pseudocode) $line=~s/lcUC/lc uc/g; I want to add one or more spaces (and perhaps a period) between upper and lower case characters that touch each other, i.e.: This is a blue widgetThis is a red widgetThis is a brown widget should be: Thus is a blue...
  7. PerlNewUser

    Understanding Hashes

    And, in digging deeper, I found another one. In this one, I see there is a %periodic, which I did not see in the previous example I posted. Using the definition you gave me, I see that the %periodic defines the hash, and the $element and $weight are the values, correct? Use a hash to provide...
  8. PerlNewUser

    Understanding Hashes

    I based my example from this thread, where it was described as a hash: http://www.tek-tips.com/viewthread.cfm?qid=1463910&page=1 Below is how it was used. I understand you explanation well enough, but still need to read deeper into these threads to understand it better. “I'd suggest using a...
  9. PerlNewUser

    Understanding Hashes

    After reading this very helpful forum for a few weeks, and now I finally have a question! I am learning Perl and don’t fully understand hashes. I understand that they can be used in place of arrays to simultaneously compare and change data, but which part of the hash expression does what...

Part and Inventory Search

Back
Top