> is basically the same as programming on Linux, however you have to know > all the funny little Windows nuances, but the PERL syntax is the same. > For example you can't do @my_array = `cat $filename` because cat doesn't > exist on a Windows box.
Then what he left unsaid is you would do @my_array = `type $filename` instead, since 'type' is built-in to command.com on 9x and cmd.com on NT. But cat is superior. And so on. So that was a big problem, keyword *was*, yipperrrrrs. Just obtain Win32 ports of Unix utilities and drop them into your system32 folder. Note that sort.exe already exists on Windows, and it stinks and is protected by system file protection so you can only delete it by first deleting from dllcache and then system32 and then navigating the warning screens. Or, I simply renamed the Unix one 'usort.exe' and use it instead. Here, one of many locations to obtain some of those Win32 ports of Unix utilities: http://www.geocities.com/ResearchTriangle/Thinktank/1212/portix/ I have a massive collection of various versions of them, have been meaning to distill them down to just the best ones. For example, there are versions of diff.exe out there that can't handle large files. Have some room on my website so I would take the time to do the legwork and provide a zip file of them all in one place if someone will nudge me there. These would be guaranteed to run in Win2K, and untested elsewhere. Ok on Win2K translates to presumably ok on NT4 and probably-without-exception-I-mean-I-would-be-shocked-if-not ok on XP and usually ok on 9x (95/98/98SE/ME). So then the only differences that come to mind are (1) paths (below), and (2) you only need #! in the first line, although you need "perl" there to use -w. It can be #!/usr/local/bin/perl -w and that works. Yes it can be an incorrect location of perl, like #!zz:\perl.exe -w, just as long as "perl" is there somewhere. #!perl -w works. And #!perl.exe -w works. #!test -w doesn't work. But #!testperltesting -w works. ActivePerl reads the location of perl.exe from the registry. Perl56.dll is the magic that does most of the translating on a Windows system. Paths: Just use '/' instead of '\' in directory paths. Or '\\'. Except for those two things, practically no differences. Suppose you wrote a script on Linux and want to use it on a Windows machine without perl installed. Copy perl.exe, perl56.dll, and myscript.pl to the Windows machine and run 'perl myscript.dll'. Unless using modules, and then the easiest route is to compile it as a standalone executable with PerlApp or Perl2Exe. I think the latter has a nagging all-hail-perl2exe message when the exe is run, correct? Maybe they gave up that annoying practice. Gary -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]