Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Perl help

Perl help
Thread Tools
Dedicated MacNNer
Join Date: Jul 2000
Location: Texas
Status: Offline
Reply With Quote
Mar 25, 2003, 04:10 PM
 
Let me preface this post by saying that I'm not a programmer and my experience with Perl is limited.

Anyways, I'm trying to get a Perl script going on our website, awstats.pl.
(awstats.sourceforge.net). In order to make it work for the first time, you have to run the script from command line and it'll analyze your httpd-logs.
The instructions wants me to type in the following command when you first set it up:
awstats.pl -config=virtualhostname -update
The terminal promptly returns : awstats.pl: Command not found.

I have tried to figure out why OSX won't let me run the perl script from the terminal. So, I guess I have two questions:

1, Can I run Perl scripts straight from the terminal?
2. What;s the command to invoke them?

Appreciate any help I can get on this.
---
One XP Box, One Suse Box, One Blue & White,
One ibook, One iMac 17 FP, one 30 gig iPod and a mini
happy .mac customer, os9 free since 3/24/01
     
Junior Member
Join Date: Apr 2000
Location: Durham, NC
Status: Offline
Reply With Quote
Mar 25, 2003, 05:38 PM
 
Originally posted by sbjordal:
Let me preface this post by saying that I'm not a programmer and my experience with Perl is limited.

Anyways, I'm trying to get a Perl script going on our website, awstats.pl.
(awstats.sourceforge.net). In order to make it work for the first time, you have to run the script from command line and it'll analyze your httpd-logs.
The instructions wants me to type in the following command when you first set it up:
awstats.pl -config=virtualhostname -update
The terminal promptly returns : awstats.pl: Command not found.

I have tried to figure out why OSX won't let me run the perl script from the terminal. So, I guess I have two questions:

1, Can I run Perl scripts straight from the terminal?
2. What;s the command to invoke them?

Appreciate any help I can get on this.
1) Make sure the directory you are in contains awstats.pl by typing "ls"
2) make awstats.pl executable by typing "chmod +x awstats.pl"
3) execute awstats.pl by typing "./awstats.pl -config=virtualhostname -update" - the ./ preceding your command tells the shell to look in the current directory for awstats.pl

Kyle
     
Junior Member
Join Date: Mar 2001
Location: Over there
Status: Offline
Reply With Quote
Mar 26, 2003, 08:39 AM
 
Change to the directory where your awstats.pl script lives and then type

perl awstats.pl -config=virtualhostname -update
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:39 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2