awk script for getting the selected records from a file.

Hello,

I have attached one file named file.txt .
I have to create a file using the awk script with the records in which 38th position is P and not V .

ex
it should have
00501 HOLTSVILLE NYP00501

and it should not include
00501 I R S SERVICE CENTER NYV00501

Thanks!

$ perl -ne 'print if m/^.{37}P/' infile
00501  HOLTSVILLE                  NYP00501
00544  HOLTSVILLE                  NYP00544
00601  ADJUNTAS                    PRP00601

Or:

awk 'substr($0,38,1)=="P"' file

Thanks, its working..