Help for this page

Select Code to Download


  1. 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;
    }
    
  2. or download this
    sub Main {
        my %CONFIG;
    ...
        )
        ...
    }
    
  3. 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
    
  4. or download this
    while (...) {
        next if $exp->expect(...
    ...
            ...
        );
    }
    
  5. or download this
    use strict;
    use warnings;
    ...
    }
    
    # warnings coming from here will be printed
    
  6. 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';
    
  7. or download this
    {
      local $SIG{__WARN__} = sub {};
    ...
    }
    
    # warnings coming from here will not be affected
    
  8. or download this
    \%{ $CONFIG }
    \%$CONFIG
    
  9. 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",
    
  10. or download this
    my $foo = $_[0];
    
  11. or download this
    my $foo = shift;
    
  12. or download this
    my ($foo) = @_;