in reply to perl to run awk and sed

I've managed to answer it just after posting..., by adding a forward slash's before the variables the command use, so perl would not try and treat them as its variables..I think..., but it works, that said if any can point me to what perl guys would normally use they would use in place of awk/sed for me to do some reaserch on, that would be great

awk 'BEGIN {FS="\t"}; {print \$1}'| sed 's/.\$//'

Replies are listed 'Best First'.
Re^2: perl to run awk and sed
by kcott (Archbishop) on Dec 01, 2015 at 05:56 UTC
    "... that said if any can point me to what perl guys would normally use they would use in place of awk/sed ..."

    That's actually a simple regex capture. Using your example of "myserver.it.com. XXXX XXX XXX XXXXXXXXXXX" (from Re^2: perl to run awk and sed):

    $ perl -wE 'q{myserver.it.com. XXXX XXX XXX XXXXXXXXXXX} =~ /^(.*?)\.\ +s/; say $1' myserver.it.com
    "... for me to do some reaserch"

    Given the simplicity of that regex, further research may be unnecessary; however, on the basis of "Im still new to perl and programming" (from your OP), you might want to start with the very basics in "perlintro: Regular expressions". At the end of that section, you'll find links to documentation with more detailed information.

    — Ken