From owner-freebsd-questions Sun Dec 9 7: 8:50 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.thebiz.net (mx1.thebiz.net [216.238.0.20]) by hub.freebsd.org (Postfix) with SMTP id 86F1237B416 for ; Sun, 9 Dec 2001 07:08:45 -0800 (PST) Received: (qmail 22041 invoked from network); 9 Dec 2001 10:08:43 -0500 Received: from unknown (172.16.0.80) by 172.16.0.178 with QMQP; 9 Dec 2001 10:08:43 -0500 Received: from unknown (HELO marty.face2interface.com) (216.238.72.249) by mail.ulster.net with SMTP; 9 Dec 2001 10:08:44 -0500 Message-Id: <5.1.0.14.0.20011209100829.00a7bec0@pop.ulster.net> X-Sender: marty@pop.ulster.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 09 Dec 2001 10:08:53 -0500 To: questions@FreeBSD.ORG From: Marty Landman Subject: question not asked (sysadmin - Perl?) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I think this question is in the spirit of "the only dumb questions are the ones left unasked." I've got the following program which is a test extracted from a formerly running script on a website. Actually I slightly altered this for posting to remove HTML tagging. ------------------------------------------------------------ #!/usr/local/bin/perl print "Content-type: text/html\n\n"; use Cwd; for($root = cwd()) {print "Root eq $root"} __END__ ------------------------------------------------------------ The permissions are 755, and it's installed on the cgi-bin. When I run this from a browser I get an empty string for Root, but when I run this from the command line I get my root directory. This used to work and I won't be able to talk to tech support till tomorrow. I know nothing about system administration; but that's where I'm guessing the answer is. FWIW I have a standalone box at home in which I installed Free_BSD and Perl, unfortunately no Apache or network connection to my office network. :( I am guessing that something about the way in which the script runs when called by a browser is disabling the Perl cwd() command where when run from the command line it is enabled. Am I getting warm? Thanks in advance, Marty (realizing it's time to start learning about some of this stuff) Website Creation Made SIMPL(tm) http://face2interface.com/Home/Demo.shtml WebSafe Color Picker -- http://face2interface.com/Websafe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message