You can add a space at the end of the line, that'll probably take care of it. Unless your editor is set to drop trailing spaces...
More reliable is to use " --" to tell GetOptions that there are no more options. In that case, the trailing CR will probably be ignored.
Note that in a more recent perl (= less than a few years old), CR inside source code is automatically handled, because in older perls, it did choke on it (e.g. when running a Windows text script on Linux). But not for the shebang line (and I honestly don't know what happens now, with multiline strings).
Of course if you had a bit of discipline and set the line endings to Unix in your text editor, you wouldn't have this problem. Most decent text editors allow you to chose a default line ending for new file, or, I would hope so.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.