in reply to Problem with require()
First, don't end a require'd file with return 1; Instead, just write 1; or "hi mom"; or something. Any non-false, non-undef value will do.
Next, to avoid ambiguity (or, rather, to avoid getting tripped up by precedence), change opendir UPLOAD,"$basedir/$name" or mkdir ... to opendir(UPLOAD,"$basedir/$name") or mkdir ... or even better, write mkdir "$basedir/$name", 0777 unless -d "$basedir/$name"; (and note that octal constants like 0777 require a leading zero).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
learn() or die;
by chip (Curate) on Dec 19, 2001 at 12:09 UTC | |
|
Re: Re: Problem with require()
by dakedesu (Scribe) on Dec 19, 2001 at 06:53 UTC | |
by dws (Chancellor) on Dec 19, 2001 at 06:59 UTC | |
by dakedesu (Scribe) on Dec 19, 2001 at 07:03 UTC |