Perl "success"
Perl "success"
- Subject: Perl "success"
- From: Jesse Shanks <email@hidden>
- Date: Tue, 03 Sep 2002 22:37:40 -0700
on 9/3/02 10:00 PM, email@hidden at
email@hidden wrote:
>
To repeat, the script below, whether saved with Unix lines or Mac
>
lines and made executable with chmod 755 (-x also tried to no effect)
>
does not create the file in /tmp/ or anywhere else.
>
>
#!/usr/bin/perl
>
open F, '>/private/tmp/junk.txt'; print F "Success"; close F;
>
>
You say it works. Can someone else please try it and confirm this.
I had also tried to get Perl to run from the Script Menu back in April
without success. Similar things...different line endings, chmod this and
that and nothing.
However, this time I opened BBEdit and created this script:
#! /usr/bin/perl
use strict;
use warnings;
open F, '>/Users/username/Desktop/junk.txt'; print F "Success"; close F;
Saved it to /Library/Scripts/Perl/ as junk.pl with Unix line endings
Went to Terminal and cd'd to that directory
Then chmod +x junk.pl
Went to the Script Menu, saw that it had a little # on the icon... But the
ones that had failed in that past did also.
Click on it... It worked. On the desktop was "junk.txt" with the word
"Success" in it.
I then clicked on a couple of test scripts that I had in there from my
previous experiments and they worked too.
Don't know why but they did work.
_jesse
--
Jesse Shanks
Writer & Web Developer
http://www.blankreb.com
email@hidden
530.886.0815
-
http://www.catsprite.com
http://www.digitallyobsessed.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.