my $var = $1 if /^\s*(.*\S)\s*$/; my @array = split ';', $var, 2;