Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
There's more than one way to do things
 
PerlMonks  

Re^4: It LOOKS right...

by ikegami (Pope)
on May 31, 2011 at 18:20 UTC ( #907521=note: print w/ replies, xml ) Need Help??


in reply to Re^3: It LOOKS right...
in thread It LOOKS right...

If the #! line isn't correct then your code will be passed to /bin/sh, not Perl

No.

$ a.pl sh: ./a.pl: usr/bin/perl: bad interpreter: No such file or directory

and that's what produced the error messages.

No. If the error messages originated from sh, they would look like

$ . a.pl sh: =: command not found sh: ./a.pl: line 3: syntax error near unexpected token `{' sh: ./a.pl: line 3: `if ($count <= 20) {'

or (requires changing shebang to #!/bin/sh)

$ a.pl ./a.pl: line 2: =: command not found ./a.pl: line 3: syntax error near unexpected token `{' ./a.pl: line 3: `if ($count <= 20) {'

The error the OP gave is indeed from perl.


Comment on Re^4: It LOOKS right...
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://907521]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-04-20 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls