Perl Droplets For Mac
Just save to your Desktop. Open Terminal, type chmod 755 a space, then drag and drop the perl script from the Desktop into the Terminal and press return.
This makes it executable. Just for kicks, I just now did a GetInfo on perlhello.pl and changed the file to always open in Terminal. Double clicking the file on the Desktop now opens a new Terminal window and executes the script. The new Terminal window looks like this: NoobiX: francine$ /Users/francine/Desktop/perlhello.pl; exit; Hello from Perl on Mac OS X! Logout Process completed Your post showing your attempt doesn't show whether you ever set the executable or not, and we don't know what the permissions are in the folder you have the script in, nor the file itself.
Perl Droplets For Mac
But like Courcoul, I suspect you just didn't do the chmod. Francine Francine Schwieder. I just copied it to a plain text TextEdit file, saved to the Desktop, used Terminal to make it executable, like this: NoobiX: francine$ chmod 755 /Users/francine/Desktop/perlhello.pl Then just did drag 'n drop of the file into the Terminal window, and hit the Return key: NoobiX:Desktop francine$ /Users/francine/Desktop/perlhello.pl Hello from Perl on Mac OS X! I do have Xcode installed, not sure whether that makes any difference or not.
One of these days I'm gonna learn shell scripting. Francine Francine Schwieder. It means you forgot the chmod part or did it wrong. Another thing, you're putting stuff at the root of the HD (/atest/), which can later conflict with operating system components.
Keep everything inside your home directory. And, of course, we all agree that Perl is a scripting language oriented towards command-line execution in Terminal, right? If you want to develop graphical scripts with Perl, you can install the Perl/Tk library from the CPAN but those will only run on top of X11 (only if you want to add libraries to the base Perl installation, do you need to have XCode installed). Perl's home is at A programming editor helps immensely when writing any sort of code. Apple's XCode is oriented towards compilable languages, such as C, C, Java, etc. And is a gross overkill for scripts. There used to be a cute editor called Alpha, but it has been mostly abandoned by its developers.
Nowadays I use Smultron Lastly, discussions of 'under-the-hood' items such as Perl can find a much wider and knowledgeable audience in the Unix group, at Discussions Mac OS X Technologies Unix. Just save to your Desktop. Open Terminal, type chmod 755 a space, then drag and drop the perl script from the Desktop into the Terminal and press return. This makes it executable. Just for kicks, I just now did a GetInfo on perlhello.pl and changed the file to always open in Terminal. Double clicking the file on the Desktop now opens a new Terminal window and executes the script.
The new Terminal window looks like this: NoobiX: francine$ /Users/francine/Desktop/perlhello.pl; exit; Hello from Perl on Mac OS X! Logout Process completed Your post showing your attempt doesn't show whether you ever set the executable or not, and we don't know what the permissions are in the folder you have the script in, nor the file itself. But like Courcoul, I suspect you just didn't do the chmod. Francine Francine Schwieder. Apple Footer. This site contains user submitted content, comments and opinions and is for informational purposes only. Apple may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Apple can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums.
Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the.