In the context of running Perl 5.004 on DOS, all that is fine, of course, after all, there is more than one way to do it. I've written modules that I try to make as backwards-compatible as possible (although only down to 5.6, so far). I even wrote some QBASIC way back. So if it helps you, you're of course free to code that way (setting aside for a moment the usual arguments about future maintainability and so on). I might just suggest that your fake warnings.pm at least contain $^W=1;, and to be aware of the issues of two-arg open like I mentioned.

On the other hand, your post was a reply to a wisdom seeker who said they were just getting started (and not necessarily on 5.004 for DOS :-) ). Many of the suggestions you made go against modern best practices (useful variable names, don't use $a and $b outside of sort, three-arg open with lexical filehandles, using warnings, and using a recent version of Perl), and those best practices usually exist for a good reason. So I think it's important to be aware of that, and I'd suggest putting in a disclaimer.

Other than that, getting Perl to run in as many places as possible is certainly not a bad thing :-)


In reply to Re^4: First attempt at bringing in file for input/output by haukex
in thread First attempt at bringing in file for input/output by catfish1116

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.