in reply to perl to run awk and sed

If you want to convert awk or sed to perl, a2p and s2p can do that for you. You can use the results as is, or just get an idea of how to do something in perl. E.g. for your awk, a2p gives:
$, = ' '; # set output field separator $\ = "\n"; # set output record separator $FS = "\t"; ; while (<>) { chomp; # strip record separator ($Fld1) = split($FS, $_, -1); print $Fld1; }
s2p outputs more cruft, but the important bit is just 's/.$//', which can be inserted into the above script.

Replies are listed 'Best First'.
Re^2: perl to run awk and sed
by kcott (Archbishop) on Dec 01, 2015 at 03:33 UTC