in reply to Re: Strange system call failure in OS X
in thread Strange system call failure in OS X
Actually, this is the way I ended up doing these system calls due to its relative simplicity:
# Declare dependencies use File::Slurp; # Declare variables we'll be using my $name = ""; my @args = (); my $result = ""; # Set computer name based on MAC address of en0 my @entries = qx(ifconfig en0 | awk '/ether/ { gsub(":", ""); print \$ +2 }'); chomp(@entries); $name = $entries[0];
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Strange system call failure in OS X
by karlgoethebier (Abbot) on Feb 18, 2013 at 20:43 UTC |
In Section
Seekers of Perl Wisdom