Precedence.

Patricia Hinman wrote:
Everything "was" perfect in my little program.  I gave
it a test run today.  My file which copies some
demofiles is sending blank empty files.  I've used -e
to make sure it exists and checked the return value on
the copy().  Both check out fine.  But the files have
no content.

Any suggestions?

This is a snippet from one copy statement:

my$ok = "";
$ok =
copy("/$htmlroot/$htmldir/demosite/$filenames[$i]","/$htmlroot/$htmldir/$files[$i]")
|| push(@messages, "Couldn't copy
/$htmlroot/$htmldir/demosite/$filenames[$i],\n to
/$htmlroot/$htmldir/$files[$i]\n Error: $!");

In the above the || binds more tightly than =, you need 'or' instead...

if(-e "/$htmlroot/$htmldir/$files[$i]" && $ok){
push(@messages, "Copied
/$htmlroot/$htmldir/demosite/$filenames[$i],\n to
/$htmlroot/$htmldir/$files[$i]");
}

Anybody see a mistake???
At least I am pretty sure ;-)...

http://danconia.org


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to