Help for this page

Select Code to Download


  1. or download this
    se strict;
    
  2. or download this
    Can't locate object method "se" via package "strict" (perhaps you forg
    +ot to load "strict"?)
    
  3. or download this
    my $data = `/sbin/ifconfig | grep “RX bytes” | head -1`;
    
  4. or download this
    $data =~ /RX bytes\:(\d+) .*TX bytes\:(\d+) .*/;
    my $recv = $1/1024;
    my $sent=$2/1024;
    $recv =~ s/\..*//;
    $sent =~ s/\..*//;
    
  5. or download this
    sub get_measures {
        my $device = qr/\A\Q$_[0]\E\s/;  # pass device name as first argum
    +ent
    ...
        return $recv, $sent;
        }