/Documents/simple_print
that is a full-path. To execute using a relative path from within your user's directory (which pwd showed you that youy were) you could use either:
Documents/simple_print
-or-
./Documents/simple_print
Notice that neither is prepended with a slash which indicates full path. Adams answer of using the ~ expansion works just as well.
-Andrew
On Tue, 27 Jul 2004, Adam Witney wrote:
Date: Tue, 27 Jul 2004 14:21:37 +0100 From: Adam Witney <[EMAIL PROTECTED]> To: Nick Pappas <[EMAIL PROTECTED]>, MacOS X <[EMAIL PROTECTED]> Subject: Re: Incorrect Path or format?
Hi Nick,
You are trying to run a file from the Document folder on your hard disk, not your home directory... You need to do it like this
perl ~/Documents/simple_print
Or
perl /Users/username/Documents/simple_print
But I suspect you will also need to make the file executable first, with this command
chmod a+x ~/Documents/simple_print
Cheers
adam
I am just learning to use Perl on OS 10.3. I am not an experienced Unix programmer, so I am probably doing something very basically wrong.
My first "Hello World" script is not executing. I created a Plain Text script using TextEdit and saved it in my Documents folder with the name "simple_print".
In Terminal, I give a pwd command and get back the reply: /Users/username
When I type: perl /Documents/simple_print, I get the diagnostic Can't open perl script "/Documents/simple_print": No such file or directory
That seems to mean I am making some kind of mistake with the path name.
The first line in the program is: #! /usr/bin/perl
What is wrong?
Nick
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.