Jump to content

How to run perl scripts...


kramer2k
 Share

8 posts in this topic

Recommended Posts

Perl scrips run natively on Mac OS X.

 

Uninstall script of XCode is a perl one.

 

On terminal if you have perl script just type "perl script.pl" or "./script.pl" (if it has the path to the perl interpreter).

Link to comment
Share on other sites

Perl scrips run natively on Mac OS X.

 

Uninstall script of XCode is a perl one.

 

On terminal if you have perl script just type "perl script.pl" or "./script.pl" (if it has the path to the perl interpreter).

 

but when I run ./users.../bkupextract.pl it says "No such file or directory"

 

see the .pl file attached

bkupextract.pl.zip

Link to comment
Share on other sites

even in the file says how to run it:

 

Usage: perl -w bkupextract.pl /Users/Cosmo/Library/Application\ Support/MobileSync/Backup/*/*

 

probably you don't have in your user's PATH "/usr/bin"

Link to comment
Share on other sites

whcih you can check by issueing the command

 

echo $PATH

 

on the command line.

 

in case it's not set there, you can do that temporarily by

 

export PATH=$PATH:/usr/bin

 

or forever by modifying the file

 

~/.profile

 

and inserting the above command in there ;)

 

edit: /etc/profile would fit too, of course.

Link to comment
Share on other sites

Also, you tried ./Users/…/script.pl, which is wrong. That's saying <The current directory>/Users/…/script.pl. If you know an absolute path to the file, you just type it in as-is: /Users/…/script.pl.

Link to comment
Share on other sites

 Share

×
×
  • Create New...