note
polypompholyx
<p>In general, it's the other way round you need to worry about more: perl on Windows lacks a number of functions that work on Unix (<code>alarm</code>, <code>chroot</code>, <em>etc</em>). However, the most important things to consider in making a script written on Windows work on Unix are when you interact with the system, either directly (using <code>system</code> or backticks), or indirectly (when manipulating files). Some general guidelines:</p>
<ul>
<li>Avoid <code>system</code> unless you want the user to have to install [http://unxutils.sourceforge.net/|Unxutils] or similar.</li>
<li>Be careful with newlines: text files end in CRLF under Windows, but just LF under Unix.</li>
<li>Use [cpan://File::Spec], [cpan://File::Temp] and friends to construct paths and filenames portably.</li>
<li>Know that <code>unlink</code> doesn't necessarily delete a file completely under Unix.</li>
<li>Don't use [cpan://Win32] modules, for obvious reasons.</li>
</ul>
498811
498811