On Fri, Mar 15, 2019 at 07:58:11AM -0700, Todd Chester via perl6-users wrote:
> 
> 
> On 3/15/19 3:02 AM, Peter Pentchev wrote:
> > On Fri, Mar 15, 2019 at 11:52:15AM +0200, Peter Pentchev wrote:
> > [snip]
> > > 3. The standard input stream in Perl 6 is called $*IN (think of it as
> > >     mostly equivalent to what <<>> and <> would read from in Perl 5,
> > 
> > ...sorry about this part, I know it's not correct.
> > 
> > > and pretty much the same thing as Perl 5's STDIN.
> > 
> > ...this is the correct statement.
> > 
> > > sub is-ours($line) {
> > >   $line ~~ /^ \s* $<pid> = [\d+] \s+ "zsh" \s .* \s+ $<elapsed> = [ <[- 
> > > \d :]> + ] $/
> > >           ?? (~$/<pid> => pad-elapsed $/<elapsed>)
> > >           !! Any
> > > }
> > 
> > Of course, you may need to modify this a bit if you don't want to look
> > for "zsh" processes... :)
> > 
> > G'luck,
> > Peter
> > 
> 
> 
> Never did figure out why everything went into @x[0]

What do you mean "everything"?  If you have an array (or a sequence) and
you sort it, you have another array (or sequence) with the same members,
but in a different order.  Then, if you only want the largest (or smallest,
or whatever) member, that means that you only want the first element of
the array.

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

Attachment: signature.asc
Description: PGP signature

Reply via email to