help with script needed

adalt's picture

They have: 72 posts

Joined: Dec 2000

Hi,

I am trying to run this script (see below) but I keep getting an error, I checked the error log & this it what it says.
________________________________________________________
Can't locate sitevariables.pl in @INC (@INC contains: /opt/perl//lib/5.00503/sun4-solaris /opt/perl//lib/5.00503 /opt/perl//lib/site_perl/5.005/sun4-solaris /opt/perl//lib/site_perl/5.005 .) at cgi-bin/classifieds.cgi line 19.
____________________________________________________________

Both "classifieds.cgi" & "sitevariables.pl" are in the same directory, cgi-bin/class, and i have tried them in ,cgi-bin,
and also trying to change line 19 to ""/username/www/cgi-bin/class/sitevariables.pl"

Any Ideas ??

Thanks

Tony
____________________________________________________________

#!/opt/perl/bin/perl
######################################################################
# Mike's Classifieds
#
# version 1.1
# Please read the README for LICENSE information. Do NOT remove the
# provided by a FREE script from mikespice.com from this script.
#
# This program will act as a classifieds server.
# Please see the included README file for distrobution and copyright
# details. Email [email protected] if you need more information
######################################################################

#use strict;
use CGI qw(:standard);
srand(); #generates randome seed.

#please edit the sitevariables.pl file to fit your site.
require "sitevariables.pl";

#begin main program
$cur = CGI->new();
printstarthtml();
print <

Before you criticise someone walk a mile in their shoes......
Then, if they don't like what you say they are 1 mile away and barefoot.

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

Adalt,
Try using the absolute path to your required file instead of the virtual one. This corrected that problem when I first got it. But haven't gotten it since...

Pimpin like a pimp with an electrofied pimpin machine!

They have: 16 posts

Joined: Jan 2001

Just under the commented out use strict line, try adding this:

BEGIN { unshift (@INC, '/username/www/cgi-bin/class/'); }
'

That should work. That line MUST go in before the require statement.

my $friends = qq[=:Jilly , Andrew , Peter & Harry:=];
print &welcome($friends), "2"; my @home;
sub welcome{my $s=shift; $s=~s{^(=\Smiling(.+?)(\:=)$}
{$_=$2;@home=split/[&,]/;}esgx;$friends= join'me',@home;
$friends=~s{(\A|\S|\s+)([A-Z]).+?(\s|\Z)}{$2}sge;my$c=-1;
$friends=~s{(me|\Z)}{++$c;@_=(qw|ust nother erl acker|);qq!$_[$c] !;}eg; $friends}

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.