Re: [perl-win32-gui-users] Port Perl from Unix to Windows

2008-01-24 Thread Charles Alderman
Ugh. Once again, I write up another response without completely reading what you're trying to do. Instead of determining the OS and then using backticks to execute shell/OS specific commands, why don't you use OS independent libraries to manipulate files and directories? Check out File::Co

Re: [perl-win32-gui-users] Port Perl from Unix to Windows

2008-01-24 Thread Reini Urban
Gary Yang schrieb: > Hi All, > > I need to port my Perl script from Unix to Windows. Can someone tell me > how to figure out which platform I am on? i.e. I need to know which Perl > command can help me determin the platform. Once I know the > platform, I'll code my script as the example bellow

Re: [perl-win32-gui-users] Port Perl from Unix to Windows

2008-01-24 Thread Charles Alderman
http://perldoc.perl.org/perlvar.html#$OSNAME $^O or "use English" and $OSNAME will tell you a little more than what you're trying to do. What you're trying kind of reminds me of how Javascript'ers figure out the browser or XHR call they need. As far as the shebang line (#!...), you're right,

[perl-win32-gui-users] Port Perl from Unix to Windows

2008-01-24 Thread Gary Yang
Hi All, I need to port my Perl script from Unix to Windows. Can someone tell me how to figure out which platform I am on? i.e. I need to know which Perl command can help me determin the platform. Once I know the platform, I'll code my script as the example bellow. But, how to figure out I