Help for this page

Select Code to Download


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