I want to pass the arguments of my routine to a subroutine as they are, possibly while adding a new argument. To give an example imagine something like this
sub log($$$){
my ($message, $log_location, $log_level) = @_;
#logs message
}
sub log_debug($$){
my ($message, $log_location) = @_;
log($message, $log_location, DEBUG_LOG_LEVEL);
}
That syntax works fine above, but requires my saving the @_ to intermediate variables to do it. I'm wondering if there is a simple clean syntax for doing so without using the intermediate variables. Something like
log(@_, DEBUG_LOG_LEVEL);
which gets an error about my "not having enough variables", but I think would otherwise work. Can this be done easily without warning?