in reply to using fields in perl
Please see What is the simplest way to print a field, as in $3 does in awk.
HTH,