in reply to ps aux and perl

c has a good point, but didnt answer your question.
@arr = split /\s+/,'root 27979 0.0 0.7 1468 1008 ? S 14:5 +9 0:00 sendmail: server foo.bar.org [222.22.22.21] cmd read';
Should do it.

T I M T O W T D I

Replies are listed 'Best First'.
Re: Re: ps aux and perl
by Jerry (Scribe) on Aug 22, 2001 at 00:00 UTC
    I saw a post recommending that code earlier... I wrote a small script using it:

    #!/usr/bin/perl @arr = split /\s+/, 'root 30341 0.0 0.7 1468 1008 ? S 15:4 +4 0:00 sendmail: server IDENT:root@bar.foobar.es [212.7.33.22] cmd +read'; foreach($var, @arr) { print "$var\n"; }

    All it returns is approximately 14 blank lines. Any ideas? -Jerry
    http://www.digilliance.net

      Yes.
      @arr = blablabla... foreach my $var (@arr) { print "$var\n"; }
      Good advise: Always use strict and always have warnings ON.

      T I M T O W T D I
        YOU my friend are the MAN! thanks so much for working code!!! I love you I love you I love you

        -Jerry
        http://www.digilliance.net