Grep usage

my file contains

xxabced.p dlksfad;
dflsdkjflkds flksdjflkdioewf
erfsdlkfjsdla;
dlkfjsd;lfkj msgdadf.p dslk kdjflksdjfl;asdfasdfjkljl
fdsf;jd ppuskldf.p

i want the output is

xxabced.p
msgdadf.p
ppuskldf.p

Can any one give the command?

With GNU grep:

grep -Eo '\w+\.p' infile

Otherwise:

perl -lne'print $1 while /(\w+\.p)/g' infile