![]() |
Quote:
filenames just fine. (It was my script I said had trouble with newlines). But -if you add a space to the end of some filename- and then run your script on its parent... perhaps you'll see for yourself what I'm saying. I'll will try the 'join' test and see what results. Thanks. I wish Perl was easier to understand. Its syntax is so "overloaded", but I guess that's also why it's powerful. : : Test complete; filenames are being received correctly; error messages print first. Is it a compile-time issue? (No, I guess not... "while (<>)" is simply messing up). Those perl man pages are amazing -yet- I have a very hard time following along. How can this be fixed? |
One obvious solution to the problem of filenames with spaces at beginning or end is to rename those files so as to avoid this nastiness.
You could do that with the script 'rename_without_endspace' that is available from my Perl script page. If you don't want to rename your files to avoid whitespace at the ends of the filenames, you could change your Bash script to use the following revised version of my Perl code: Code:
grepl_perl_code=$(cat <<'EOT' |
That dood it!
Thanks dude. :) |
| All times are GMT -5. The time now is 05:33 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.