This assumes homebrew-perl. It should be able to detect the perl installed on the system, so you can get rid of this line most likely.