Why does string concatenation in perl result in two lines, not one?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
The problem is $NewCommandB is always split into two lines, where the second line contains the "/atlas2/<blah>/<etc>/..." string. Since I am generating a .sh file to execute a lot of similar commands I need the string to all be on one line. Any idea why I get this behaviour and any suggestion on how to tell perl to make $NewCommandB a one line string?
btw for completeness finalFileList.txt contains just file names one line after another:
Perl is an extremely robust and full-featured language, especially when the vast CPAN library is considered and properly brought to bear. As a perfectly general blanket statement: always start your program design with a thorough review of what CPAN already offers you.
Last edited by sundialsvcs; 01-12-2010 at 08:01 PM.