in reply to Using Perl instead of awk!

For your code to work you need to escape the '$' awk is using:
my $pSWP = `awk '/something/ { print \$3 }' /dir/file`;
But like others said, why use awk when you can do it in perl :)