I'm evidently doing something stupid. I have about 2 dozen working perl programs on my laptop (Fedora 21) which work.
And one that doesn't in ways that I don't quite understand. First, it compiles fine: perl -c tells me the syntax is ok. Second, it runs when I use it as an argument to perl: perl inv (inv is the program's name). When I try to run it by using inv, I get this:
/home/emc/bin/inv: line 1: #!/usr/bin/perl: No such file or directory
/home/emc/bin/inv: line 4: use: command not found
/home/emc/bin/inv: line 5: use: command not found
/home/emc/bin/inv: line 7: my: command not found
/home/emc/bin/inv: line 9: my: command not found
/home/emc/bin/inv: line 11: my: command not found
I'm stumped. I basically use the same few header lines for all my perl programs: the shebang line, use warnings, and use strict.
I know somebody here has a clue, so hit me with those clue-bats.
Information about American English usage here and here. Floating point issues? Please read this before posting. — emc
-
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>
<u> <ul>
-
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
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|