SPUG:Confused field parser seeks...
Tom Legrady
legrady at earthlink.net
Sun May 25 11:32:19 CDT 2003
You might also consider:
( $f, $uid, $pid ) = unpack 'A8 A8 @15 A8 A*', $lastline;
Well, that's for plain `ps`, which produces 4 fields, so it's obviously
not the version you're actually using
Tom
On Sun, 2003-05-25 at 11:47, Brian Hatch wrote:
> > Thanks that worked great. Here's my get_newuid:
>
> If you only need a subset of the fields, you may
> want to consider an array slice:
>
> > ($f1,$f2,$f3,$f4,$f5,$f6,$f7)=split /:/, $lastline;
>
> ($field1, $field3, $field4) = ( split /:/, $lastline )[0,2,3];
>
>
>
> --
> Brian Hatch "Zathras never happy. Zathras
> Systems and happy once, had friend once,
> Security Engineer but wheels fell off, very sad...."
> http://www.ifokr.org/bri/
>
> Every message PGP signed
--
Regime change begins at home.
More information about the spug-list
mailing list