All,
am I using the correct method to get the return code whether a previous
line or command was 0 false or 1 true?

thank you,



#!/usr/local/bin/perl -w

use strict;
use strict 'subs';

my $file = qq(/tmp/mbfree);
open (F, "+<$file") or die "unable to open file $file $!\n";

foreach (<F>)  {
        if ( $. > 2 ) {
        last;
        } else { print "return code is: $? \n";
        last;
        }
}
print "line count is: $. \n";
print "return code is: $? \n";
close (F);






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>


Reply via email to