Thanks to everyone...

I didn't know about File::Spec and I will definitely be using that.

Currently, my application consists of 16 Perl files and it's still growing. So, having a version of each of those, for each platform, isn't a good choice for me because they are still undergoing changes. I might need to make a change in the code, then have to remember to do it exactly the same way two more times.

I'm already using a separate configuration file. That does save some time when I need to copy the code to the other platforms.

The ScriptInterpreterSource directive is new to me also. It might save me the monotonous task of editing every file every time I move the code to the Windows box, but I am curious what I need to do to make it work. I've read the documentation . This may be a Windows question rather than a Perl question, but maybe you can still help me out: The doc says it will use Shell\ExecCGI\Command or, if it does not exist, Shell\Open\Command from HKEY_CLASSES_ROOT, but I checked and the only subkey I have for the .pl extension is PersistentHandler. Will it still work, or do I need to manually add the key?

Update : It worked! :) I had to manually add a registry key for the .pl extension in HKEY_CLASSES_ROOT I created keys: Shell/ExecCGI /Command, then (this is the part the doc doesn't mention) I created a string named command and it's value was c:\xampp\xampp\perl\bin\perl.exe %1. Until the registry key was exactly right, it relied on the #! line. I used ScriptInterpreterSource Registry as recommended. I couldn't get it to work with Registry-Strict.
(End of Update)

Eventually, this entire application will need to go on an installation CD with an autorun.inf that will put everything in the right place. I'll figure that out. I can even create a .reg file, if necessary.

I do all of my development on Linux, when possible, and I , personally, am case-sensitive :)

--
-- GhodMode

In reply to Re: Cross-Platform code by GhodMode
in thread Cross-Platform code by GhodMode

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.