Help for this page

Select Code to Download


  1. or download this
    open($fh, "command |") or die "command wouldn't run...because $!\n";
    @output = <$fh>;
    
  2. or download this
    my $command = "/usr/local/mysql/bin/mysql -u anonymous " .
                  "-h my.database.org ".
    ...
    open($fh, "$command |") or die "Could not execute $command because $!\
    +n";
    @results = <$fh>;
    @results = grep { /$temp_choice/} @results;
    
  3. or download this
    while(<$fh>)
        {
         do_something if /$temp_choice/;
        }