![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Editing File In-Place to put tab before UpperCase Lettersby ranjan_jajodia (Monk) |
on Jul 23, 2005 at 06:11 UTC ( #477430=perlquestion: print w/replies, xml ) | Need Help?? |
ranjan_jajodia has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, I have a file whose entries are in the following format: JohnGalt DagnyTagart HenryHankRearden ... I want the content to be in the following format: John Galt Dagny Tagart Henry Hank Rearden ... i.e, putting tabs(\t) or spaces(\b) before every Upper case letter. Is there a easy way out like doing it by in-place editing. I think s or tr cannot be used here and i need some way to insert character. Could any one point me in the right direction? If it is not possible than i would have to write a complete script to do that which i feel is not needed here. Ranjan --Let Logic Rule--
Back to
Seekers of Perl Wisdom
|
|