A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Difference between or and || in Perl
- Use || / && when you want to assign or return the result of the expression
- Use 'or' / 'and' when you only need to evaluate the truth or falseness, e.g. for an if statement
Pretty print Data::Dumper, with variable names
use Data::Dumper;
$Data::Dumper::Indent = 1; # pretty print
Data::Dumper->Dump([\@debug_log],['debug_log']); # name the variable
Subscribe to:
Posts (Atom)