What does sudo chmod 0755 /usr/local and sudo chgrp wheel /usr/local do?
When you perform the chmod 755 filename command you allow everyone to read and execute the file, and the file owner is allowed to write to the file as well. You may need this for Perl and other scripts that should to be run via a webserver. If you apply 755 to a directory, it means that everyone can go to it and get its file listing.

When you run chgrp group-name filename command you change the group of each filename to group-name. 

Running both commands using sudo prefix let you be sure that the changes takes effect, because your run it as root that is the user with most permissions on every single unix like machine.

You can type man chmod, man chgrp or man sudo for more info and options.