return code
DBSMITH_at_OhioHealth.com
Date: 02/27/05
- Next message: John W. Krahn: "Re: return code"
- Previous message: Leslie Viljoen: "Re: problem with instalaion of DBD::mysql"
- Next in thread: John W. Krahn: "Re: return code"
- Reply: John W. Krahn: "Re: return code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Sun, 27 Feb 2005 17:12:48 -0500
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
- Next message: John W. Krahn: "Re: return code"
- Previous message: Leslie Viljoen: "Re: problem with instalaion of DBD::mysql"
- Next in thread: John W. Krahn: "Re: return code"
- Reply: John W. Krahn: "Re: return code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|