ok perl people... I chnaged my code from >> use strict; >> use warnings; >> my $dev = qw/original1/; >> my $dev1 = qw/clinical1/; >> my $fout = qq(/usr/local/log/fuji.out); >> >> open (OUT, "+>$fout") || die "unable to open file: $fout $!"; >> open (FOO, "samcmd a $dev 2>\&1 |" ) || die "unable to open >> pipe... $!"; while (<FOO>) { >> if (/regular files/ or /archdone files/) { >> my $diff=0; local $, = "\n"; >> s/,//; >> print +(split)[2], $,, $diff-=$1;
TO my $dev = qw/original1/; my $dev1 = qw/clinical1/; my $fout = qq(/usr/local/log/fuji.out); open (OUT, "+>$fout") || die "unable to open file: $fout $!"; open (FOO, "samcmd a $dev 2>\&1 |" ) || die "unable to open pipe... Broken? $!"; while (<FOO>) { if (/regular files|archdone files/) { my $diff=0; local $, = "\n"; s/^\w+(\s+)\w+(\s+)// && s/,//,; print $_, $,; } } and the output went from the first code example 63097 63077 to 63097 602.420G 646843270103 63077 601.932G 646319397797 so really I am in no better position, just playing with reg exps as highlighted above. my goal is still the same whether I use split or a reg exp to get the 2 numbers to subtract. any other ideas? I am thinking of just putting these 2 numbers to my FH then subtracting them from this file. thanks again, derek Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>