|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: chomping the output of Shell.pmby kcott (Parson) |
| on Sep 09, 2012 at 05:11 UTC ( #992557=note: print w/ replies, xml ) | Need Help?? |
|
G'day Rolf, Update: I posted a solution but later found it didn't work with commands that output multiple lines (e.g. ls, ps, etc.). Here's a new solution that doesn't have that problem. The original also had a portability issue: this one doesn't. (The spoiler below contains the original solution.) My .perldb contains:
Obviously, substitute qw{pwd date ls ps} with your qw/commands/. See perldebug - Debugger Customization for a description of %DB::alias. Here's a test run:
The typo (date "%Y-%m-%d") was accidental but I left it in just to show that the mistake was handled in a reasonable fashion. <Reveal this spoiler or all in this thread>
-- Ken
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||