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:

  1. navigate folder cd /path/to/your/script/location have replace /path/to/your/script/location in example, actual path
  2. 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

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -