I'm curious if there is a way to print all the last known contents of the variables (scalar, array, hash and reference) inside a script automatically.
So, that at the end of the script, I can just run something like print_all_variables, and it will print the contents of all variables similar to the format output of Data::Dumper.