How can I use Awk inside a Perl script?
- by papoyan
I'm having trouble using the following code inside my Perl script, any advise is really appreciated, how to correct the syntax?
# If I execute in bash, it's working just fine
bash$ whois google.com | egrep "\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" |awk ' {for (i=1;i<=NF;i++) {if ( $i ~ /[[:alpha:]]@[[:alpha:]]/ ) { print $i}}}'|head -n1
…