- or download this
my @output = `bpdbjobs`;
#while (<DATA>){
for (@output) {
# process lines
}
- or download this
my $filename = 'output.txt';
open my $fh,'<',$filename or die "Could not open $filename : $!";
while (<$fh>){
# process lines
}
- or download this
open my $fh, '-|', 'bpdbjobs' or die $!;
while (<$fh>){
# process lines
}
close $fh or die $! ? $! : $?;