Julia how soon you forget

I wanted to write a program to rename a lot of files and I remembered how much I liked how Julia worked with files. So I jumped back in. I needed to bypass a file if it had a “-” in a certain position in the file name. So for example I wrote if filename[5]==”-“…then bypass it. But it didn’t work. I knew I had the right position. Scratched my head, added println statements, to debug. WTH? Surely Julia must be broke. Spent more time on a simple if comparison than I should.

Finally remembered that Julia makes a distinction between strings (double quotes) and characters (single quotes) All I needed to do was…if filename[5]==’-‘. Also the typeof() statement would have helped.