yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway here is my updated code. and here is a sample output: My goal is to get all F01 which I am but I am having issues capturing all of these values into my array. When I run the I get the data I want to see which is just the F01 column, but when I comment out line 14 and uncomment line 15 and uncomment line 21 I see no data in the array??? In the end I want the F01 column and the % column.
thank you, derek 1 2005/01/20 15:39 17 2% -il-o-b- - - - - sg F01000 2 2005/01/20 15:53 14 1% -il-o-b----- sg F01001 3 2005/01/18 09:53 2 0% -il-o-b----- sg F01002 4 2005/02/04 16:41 196 100% -il-o-b----f sg F01003 5 2005/02/05 21:13 305 100% -il-o-b----f sg F01004 6 2005/02/28 22:47 180 100% -il-o-b----- sg F01005 13 2005/02/08 16:07 112 100% -il-o-b----f sg F01006 14 2005/02/09 21:56 122 100% -il-o-b----f sg F01007 15 2005/02/11 10:51 147 100% -il-o-b----f sg F01008 16 2005/02/13 11:35 193 100% -il-o-b----f sg F01009 17 2005/02/14 23:46 79 100% -il-o-b- - - -f sg F01010 #!/usr/bin/perl 1> use strict; 2> use warnings; 3> $ENV{"PATH"} = qq(/opt/SUNWsamfs/sbin:/usr/bin:/usr/sbin:/usr/local/log); 4> open (V4, "samcmd v4 2>\&1 |" ) || die "unable to open pipe... Broken? $!"; 5> my @fa =(); 6> my @ha =(); 7> my $i =0; 8> foreach (<V4>) { 9> local $, = "\n"; 10> #print +(split)[6,7], $,; 11> s <sg> (); 12> s {\-*} ()g; 13> s {\w+} ()i; 14> print +(split)[5,6,7], if (m/f01(\d+)/gi ) 15> #$fa[$i++] = +(split)[5,6,7] if (m/f01(\d+)/gi ); 16> #print +(split)[4],$,; #% column 17> } 18> close (V4); 19> print "\n"; 20> print "Now printing array element 0\t", $fa[0], "\n"; 21> #print "Now printing entire array \t", @fa, "\n"; 22> print "Now printing array count \t", $#fa, "\n"; Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "Ing. Branislav Gerzo" <[EMAIL PROTECTED]> To beginners@perl.org 04/27/2005 02:46 cc AM Subject Re: REGEXP [EMAIL PROTECTED] [D], on Tuesday, April 26, 2005 at 17:12 (-0400) made these points: D> s/sg//, s/\- {1,}(\w{1,})//,print +(split)[5,6,7], if (m/f01(\d+)/gi ) I think no one replied to you because we don't know what should be output. -- How do you protect mail on web? I use http://www.2pu.net ["I am a Jello's God!" shouted Yahweh, quivering in anger.] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>