in reply to Re: ps aux and perl
in thread ps aux and perl

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

Replies are listed 'Best First'.
Re: Re: Re: ps aux and perl
by Cine (Friar) on Aug 22, 2001 at 00:08 UTC
    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

        Anytime ;) Especially with that mood ;)

        T I M T O W T D I