Welcome to Perl! You may try the following shell one-liner:
perl -nale 'print $F[3]' comms_input
- -n means loop through each line of comms_input
- -a splits each incoming line into array @F, using whitespace as delimiter
- -l causes print statement outputs to end with newline "\n"
- -e defines loop code to be executed after autosplitting is done
Note: Perl array reference is zero-indexed by default -
'print $F[3]' vs
{print $4}