Help for this page

Select Code to Download


  1. or download this
    my $term;
    if ($ENV{TESTING}) {
    ...
    } else {
       $term = Term::ReadLine->new('My Application');
    }
    
  2. or download this
    my $term;
    if (-t STDIN) {
    ...
    } else {
       $term = Term::ReadLine->new('My Application', \*STDIN, \*STDOUT);
    }
    
  3. or download this
    my $term = Term::ReadLine->new('My Application', \*STDIN, \*STDOUT);
    
  4. or download this
    use IO::Handle;
    
    ...
    } else {
       $term = *STDIN;
    }