Hello. Obviously I am new to Perl and Komodo. I am at work, and am not sure if there are restrictions on my networked computer. I did a simple “Hello World” and when I ran the program, this was the output:
CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. Can’t open perl script “Hello.pl”: No such file or directory
Press any key to continue…
Please provide exact repro steps. There are at least 3 different ways you can run a file in Komodo depending on what version and type you’re using
Include paths used, commands run, menus used, etc.
Please also include what version of Komodo you’re running.
- Carey
Assignment:
Open Komodo Edit
-
Click on the new file icon to create a new file, it’s automatically called “Text-1.txt”
-
Save the file as Hello.pl by going to File>Save As
-
Now that you have saved it as a Perl file (.pl) Komodo knows what language you want to use! So it will custom itself for Perl. You can save it anywhere you like, just remember where it is on your computer!
-
In this new .pl file you just created, we want to execute two statements (lines of code), to print “Hello World” to the screen.
-
So in the body of the file, type:
print “Hello World\n”;
exit;
-
Make sure you don’t copy and paste, because Word uses “smart quotes” and Komodo and other editors are looking for the simple quotes.
-
Notice that komodo color coded the words “print” and “exit”, which are commands in Perl, and the “Hello World”, a string in Perl, in two different colors so you know which is which! Generally all commands are colored in that shade of red and all strings are colored in blue.
-
Now we have to run this program. Go to Tools and click on Run Command
-
In the Run box, type: perl Hello.pl
-
Make sure the path set in Start in, points to where you saved the file, if not click on Browse to point to the folder where you saved it.
-
Under Run in, pick New Console, this will automatically open up a command prompt window when you run your program.
-
Once you have all that set, click on the Run button to run the program.
That’s configurable. See Preferences - Fonts & Colors
(be sure you have “Show Advanced” checkbox checked if you want to change these colors only for Perl code).
Thanks for the thorough repro. It’s really helpful but you seem to have left out the key piece of information. What is the path that you explicitly set in the second step 5 above, in the Run Command dialog? Is it actually the UNC style path? Or is a standard Windows path, eg. C:\path\to\file.pl
.
If it’s the former (the UNC path) you likely need to mount whatever that remote drive is to a local letter drive. Something like this tutorial does.
You have a typo in your command also. Looks like you typed per
rather than perl
.
You could avoid all of this by no setting “Start in” and using the Komodo Command shortcuts to construct your commands when you can: http://docs.activestate.com/komodo/9.2/shortcuts.html#shortcuts_top
You could run your command like so:
%(perl) %F
Let us know if that helps.
-
Carey