Perl

From WeWeWeb Wiki
Jump to navigationJump to search

If I excecute the script via: "perl hello.pl", it responds as expected:

Content-type: text/html
Hello, World


But, if I try to just execute it directly, the system responds:

:bad interpreter: No such file or directory

file hello.pl

it should tell you

"hello.pl: a /usr/bin/perl script text executable"

If you have (g)vim or vi on you linux box it's easy to change the format from win format to unix format: Load the file in vim and type the following in command mode:

: set ff=unix

Save the file and it should be a unix file (check with "file <name-file>").

Read http://forums.devshed.com/t118489/s.html


Goto Linux