PracticeDev/study_perl/get.pl

6 lines
177 B
Raku

use Net::Address::IP::Local;
# Get the local system's IP address that is "en route" to "the internet":
my $address = Net::Address::IP::Local->public;
print("$address\n");