in reply to combined text&files
For instance, I'd change:
to$fHandle = CGI::->new(); $fCounter = 0; while ($fCounter <= 4) { $fBuffer[$fCounter] = fHandle->param($fName[$fCounter]); $fCounter = $fCounter + 1; }
$fHandle = CGI->new(); # note you don't need the colons for (0..4) { $fBuffer[$_] = $fHandle->param($fName[$_]); }
And why use goto when a subroutine would probably be more natural? Obviously I don't know what each section does but I would suspect that a sub could be a better answer... so I'd consider changing:
etc. with the following:if ($fBuffer[0] ne "Proccess") {goto BadAccess} if (length($fBuffer[1]) < 1) {goto BadAccess} if (length($fBuffer[2]) < 1) {goto BadAccess} if ($fBuffer[3] ne "thread2") {goto BadAccess}
etc.BadAccess() if ( $Buffer[0] ne "Process" or length $fBuffer[1] < 1 or length $fBuffer[2] < 1 or $fBuffer[3] ne "thread2" );
Also, I can't help but wonder if using hashes might provide a more readable solution than using an array and referring to the properties you are expecting by number...
These are just suggestions... as everyone knows There's More Than One Way To Do It but everytime a monk has given me a suggestion it's proven invaluable to study it even if I don't end up doing things exactly as suggested! Hope it helps.
..Guv
|
|---|