- or download this
use strict;
- or download this
use warnings;
- or download this
Scalar value @hostname_short[0] better written as $hostname_short[0]
- or download this
@hostname_short = split(/\./,$fqdn,2);
my $hostname = "@hostname_short[0]";
- or download this
my $hostname = (split /\./, $fqdn, 2)[0];