Hi All,
What am I doing wrong here?
ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse;
print @x[0] ~ "\n";'
7380
7581
7698
13023
13767
13908
Two problems:
1) "lines" is putting everything into @x[0]
2) "reverse" is ignoring me as there is no @x[1]. etc.
The result I wa
Hi All
Fedora 29
Is there a way to print to a printer, other than a system call
to lpr?
Many thanks,
-T
On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote:
Hi All,
What am I doing wrong here?
ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse;
print @x[0] ~ "\n";'
7380
7581
7698
13023
13767
13908
Two problems:
1) "lines" is putting everything into @x[0]
2) "revers
6am here and I'm not at a computer but I think your problem is trying to
use both -n which runs your code on each line of STDIN and lines.
Try one or the other see what happens.
Once I'm ambulant and at a computer I'll poke at it myself.
On Fri, 15 Mar 2019, 05:34 Todd Chester via perl6-users, <
On Fri, 15 Mar 2019, 05:34 Todd Chester via perl6-users,
mailto:perl6-us...@perl.org>> wrote:
On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote:
> Hi All,
>
> What am I doing wrong here?
>
> ps ax | grep [f]irefox | perl6 -ne 'my @x =
$_.words[0].lines.re