in reply to perror.pl

Why the grep? I'd write that:

   perl -le 'print "$_: " . ($! = $_) for @ARGV' 13 20

-sam

Replies are listed 'Best First'.
Re^2: perror.pl
by Hue-Bond (Priest) on Jul 05, 2006 at 18:33 UTC

    My actual program has some useless lines before the ones I posted, along the lines of use warnings; use strict; (yes, I use them always). Under that conditions:

    $ perl -Mstrict -wle 'print "$_: " . ($! = $_) for @ARGV' 13 20 invali +d 13: Permiso denegado 20: No es un directorio Argument "invalid" isn't numeric in scalar assignment at -e line 1. invalid:

    In fact, even with the grep, a bug remains where the parameter 0 is supplied. I didn't bother fixing it.

    --
    David Serrano