Run Perl script in Linux environment -
i'm trying run code on linux environment
here's code (saved hello.pl):
#!/usr/bin/perl use strict; use warnings; print "hello you\n";
here's tried on linux environment:
%perl hello.pl
i tried listing out path starting c:\users\...
, on
i keep getting error says:
can't open perl script "hello.pl": no such file or directory
you have located in same folder hello.pl
in "window" (aka terminal, or console) try execute perl hello.pl
.
on linux, can determine folder you're in issuing pwd
.
if you're not in same folder (the probable cause of error), have 2 options:
- navigate folder
cd /path/to/your/script/location
have replace/path/to/your/script/location
in example, actual path - execute file
perl /path/to/hello.pl
- of course, have replace/path/to/
in example, ac
also, can try , view file console running less hello.pl
Comments
Post a Comment