in reply to Re^4: Perl cheat sheet (dualvars)
in thread Perl cheat sheet
The example was fine. It doesn't make sense for logger to need the dualvar.
- If you wanted to pass the error string to the sub, the caller would use "$!".
- If you wanted to pass the error number to sub, the caller would use 0+$!.
- If the sub needs both an error string and an error number, it would take two arguments.
- If the sub wants to look at $!, it wouldn't take it as an argument.
In Section
Craft