- or download this
sub process_command_line_args {
#set default values for dynamic config settings
...
my @args = ($layout,$wait_for_child,$wait_for_exec,$name,$prompt,$
+configf,$quiet,$outf,$debug,$batchsize,$proto,$tacacs,$verbose,$heade
+r,$mailref,$path);
return \@args;
}
- or download this
sub Main {
my %CONFIG;
...
)
...
}
- or download this
$WARN = 0; #supress flow control warning in following block due to exi
+ting anon sub
LOOPCTRL: while ($lb < 10){
...
);
}
$WARN = 1; # reset to default
- or download this
while (...) {
next if $exp->expect(...
...
...
);
}
- or download this
use strict;
use warnings;
...
}
# warnings coming from here will be printed
- or download this
# Don't warn about exiting subs via loop control:
no warnings 'exiting';
# Don't warn about using undef in numeric or string operations:
no warnings 'uninitialized';
- or download this
{
local $SIG{__WARN__} = sub {};
...
}
# warnings coming from here will not be affected
- or download this
\%{ $CONFIG }
\%$CONFIG
- or download this
my $range = '1000000';
my $rand = int(rand($range)); ##generate random temp-db filename to al
+low for simultanous script execution
...
tempdb => "$path/$rand.db",
- or download this
my $foo = $_[0];
- or download this
my $foo = shift;
- or download this
my ($foo) = @_;