sub dbg { my $msg = shift; print "[DEBUG] : $msg\n" if ($main::DEBUG); }