in reply to Re: CGI Question
in thread CGI Question

Thank you! That did the trick! Which brings me to another question...how can I adjust the script so that the $basedir will always point to the directory where the script is newly written? Or possibly add a $subdir variable? If so, how can I accomplish this?

thank you
koa

i want to learn

Replies are listed 'Best First'.
RE: RE: Re: CGI Question
by Shendal (Hermit) on Sep 27, 2000 at 02:03 UTC
    Ummm, I'm not exactly sure what $basedir is supposed to mean. Perhaps something like this will show you a solution?

    #!/usr/bin/perl -w use strict; # always use File::Basename; my $prog = $^X; my $basedir = dirname($prog); print "prog : $prog\n"; print "basedir: $basedir\n";
    Which outputs:
    prog : /usr/bin/perl basedir: /usr/bin

    Cheers,
    Shendal