I have spent all day trying to figure out how to handle a text file containing a Windows directory list with Perl 5.8.7. Did I mention that the text file contains latin characters? The text files are generated using the “dir” command from the Windows command line.
Tip 1: The “\U” switch to the “cmd” line will cause all output of subsequent commands to be output as Unicode.
This was great! I was finally going to be able to get rid of the gibberish that I had been dealing with for a week and have a standardized format that Perl could surely handle. WRONG! Yes, I did have the text files as Unicode but I had absolutely no luck figuring out how to process them.
Until I found this link -> http://groups.google.com/group/php.notes/msg/cd7288f1ae61b59e.
To say I have been across the interweb looking for that info would be an understatement. How did I get to that location? Well…
- http://www.google.com/url?sa=t&ct=res&cd=9&url=http%3A//aspn.activestate.com/ASPN/Mail/Message/perl-win32-users/2756795&ei=l573Qo3pAdDc4QGb5OGVDg -> I didn’t find what I was looking for so I took a chance on the search and ended up here…
- http://aspn.activestate.com/ASPN/Mail/Message/1205536 -> I then went one step down the thread to here…
- http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-users/1205554 -> Where I found a link to here…
- http://use.perl.org/~jplindstrom/journal/4855 -> Which in turn contained the link above…
I love software development and the internet is very useful and easy to navigate. I hope this helps someone.
Stay tuned for a new theme and new widgets.
Thanks.
0 Responses to “Axis of Evil: Windows, Perl, and Unicode”