in reply to shell prob

You might try this: perl -e 'while (my $var = <STDIN>) {$run = "awk -f work_5messages.awk ".$var; `$run`;}'

Replies are listed 'Best First'.
Re^2: shell prob
by blazar (Canon) on Dec 27, 2006 at 16:47 UTC
    perl -e 'while (my $var = <STDIN>) {$run = "awk -f work_5messages.awk ".$var; `$run`;}'

    Apart that you don't need to create a temporary variable like that, and I don't see any particular advantage in doing so, any good reason to use backticks in void context?!? If you really want to stay minimal,

    chomp, system "awk -f work_5messages.awk $_" while <STDIN>;

    or (better)

    chomp, system qw/awk -f work_5messages.awk/, $_ while <STDIN>;

    But even better is to handle possible errors...