Help for this page

Select Code to Download


  1. or download this
    # Reading from a prepopulated array
    my @wanted;
    foreach my $line ( @input ) {
        push $line, @wanted if $line =~ /^SELECT poid/;
    }
    
  2. or download this
    # Reading from a filehandle
    my @wanted;
    foreach my $line ( <$input_fh> ) {
        push $line, @wanted if $line =~ /^SELECT poid/;
    }
    
  3. or download this
    my @wanted = grep { /^SELECT poid/ }, @input;