find_perl <- function() { perl <- Sys.which("perl") if (perl == "") { stop( "Cannot find 'perl'. httr2curl requires perl to be installed and on the PATH.", call. = FALSE ) } return(perl) }