Since interest is limited to the very first returned value, we can limit the split and save a little time.
my $server - (split /\s+/, $line, 2)[0];
The optional third parameter limits the number of returned values to 2, so perl doesn't waste time splitting the rest of the line.
In reply to Re^4: perl to run awk and sed
by GotToBTru
in thread perl to run awk and sed
by deelinux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |