Help for this page

Select Code to Download


  1. or download this
    use Term::ReadLine;
    my $term = Term::ReadLine->new("prompt");
    my $input = $term->readline("Enter search pattern: ")
        or die "no search pattern entered";
    my @pats = split ' ', $input;
    
  2. or download this
    my $infile = shift;
    open(my $in, "<", $infile) or die "Failed to open $infile: $!";
    my $outfile = shift;
    open(my $out, ">", $outfile) or die "Failed to open $outfile: $!";