It is fairly easy to translate your system call to pure perl:
use strict; use warnings; open my $dev, "<", "/proc/net/dev" or die $!; my ($eth0) = grep {/eth0/} <$dev>; close $dev; my $k = (split /\s+/,$eth0)[1]; $k =~ s/eth0://g; print "$k\n";
Outputs:
190722498
In reply to Re: system command question
by citromatik
in thread system command question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |