in reply to Re: how to print out a variable name and its value
in thread how to print out a variable name and its value

Your example is expecting named parameters, but it's not sending the named parameters:
use Data::Dumper; sub some_sub { my $args = { first_name => '', surname => '', @_ }; print Dumper $args; } some_sub first_name => 'Edward', surname => 'Lear';
will work!
[]s, HTH, Massa (κς,πμ,πλ)