in reply to Re: Handling the output of a system command -- how to best manage?
in thread Handling the output of a system command -- how to best manage?
Which produces one line with a grey background, that simply has a -1 in it.use Modern::Perl; my @l = system(`ls -1b`); my $c = 0; # toggle for odd/even lines for (@l){ chomp; my $bg = $c ? "#eee" : "#ccc"; say qq| <p style="font-family:mono;background:$bg">$_</p> |; $c = 0 if $c++ == 1; }
I'm confused. Any further thoughts?
Thank you again for your response.
use perl::always; my $perl_version( 5.12.4 ); print $perl_version;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Handling the output of a system command -- how to best manage?
by aaron_baugher (Curate) on Jun 21, 2012 at 03:18 UTC | |
by taint (Chaplain) on Jun 21, 2012 at 04:23 UTC | |
by aaron_baugher (Curate) on Jun 21, 2012 at 15:22 UTC |