Welcome to the Monastery | |
PerlMonks |
Re: Shebang Inside the coding ?by sk (Curate) |
on Jan 16, 2006 at 05:57 UTC ( [id://523401]=note: print w/replies, xml ) | Need Help?? |
Shebangs is meaningful only on the first 2 bytes in the first line of a file.
call that prog "hi" and try to chmod +x on it and run it. It will work fine. (of course assuming the path to perl is correct) Now add a blank line above #!. Try to run this again. What do you see? Also try to add a space before shebang. what happens now? Vim is not looking to see if the shebang is on the first line or not. That's why it is coloring it. In short, that line is just a comment if it is in the middle of the code. -SK Update: Please see ysth's reply on how shebang can have other stuff before it.
In Section
Seekers of Perl Wisdom
|
|