hoafaloaf has asked for the wisdom of the Perl Monks concerning the following question:
The problem is, if I use this alias without specifying any arguments I get a "bad ! arg selector" message (because of the "!:1" reference). Is there any way to trap the error message output in the code -- or make sure that the code never gets to the point where it needs to worry about it?alias ka 'ps -ef|&perl -n -e '"'"'END{@a&&kill(9,@a)}($a=(split())[1]) +!=$$&&/\!:1/&&kill(2,$a)&&push(@a,$a)&&print'"'"''
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: tcsh/perl alias question ...
by Anonymous Monk on Apr 01, 2009 at 09:37 UTC | |
by hoafaloaf (Initiate) on Apr 03, 2009 at 07:32 UTC |