in reply to -F and trailing empty fields

I would suggest that you discard the -F option (because it doesn't do what you want) and instead add "@F=split /,/, $_, -1;" to the beginning of the one-liner (because it does what you want).

Replies are listed 'Best First'.
Re^2: -F and trailing empty fields
by tuxz0r (Pilgrim) on Apr 30, 2008 at 17:10 UTC
    Well, I can always do that, as I did reference the post about split options and preserving empty trailing fields, but my question was specifically geared toward "is there a way to do that same thing with the -F option on the command line." Otherwise, yes, I can just break all this out and write a number of perl scripts using split directly. Just trying to keep this short and on a single line (as I'm doing other stuff I don't show in the example in the original post).

    ---
    s;;:<).>|\;\;_>?\\^0<|=!]=,|{\$/.'>|<?.|/"&?=#!>%\$|#/\$%{};;y;,'} -/:-@[-`{-};,'}`-{/" -;;s;;$_;see;
    Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.