#!/usr/bin/perl use strict; use Term::ReadLine; my @list = <>; # get pipeline input print scalar @list, " file names found\n"; my $term = new Term::ReadLine; my $prmt = "would you like to see the next file name? [y] "; while ( defined( $_ = $term->readline($prmt))) { last if ( /^n/i ); print shift @list; } #### ... open( FIND, '-|', 'find', $basedir, @opts ) or die "find: $!"; while () { if ( theres_something_about( $_ )) { print "What do you want with $_ ? "; chomp ( my $desired_outcome = <> ); #(fixed missing close-paren) do_something_to( $_, $desired_outcome ); } } close FIND;