in reply to System Calls
The correct answer (ie, check $?) has been already given, so this is just out of curiosity...
what was
system ("mkdir($NEW_AGENDA_ROOT,0777)")
supposed to do? Inside system you have to put system commands, not Perl functions!