in reply to Altering Behavior of a Script
Here's the caller.pl#!/usr/bin/perl print "Enter your answer?\n"; if ( -t STDIN ) { <STDIN>; print "Terminal was used.\n"; } else { print "Not a terminal.\n"; } print "Done.\n";
So, when I run caller.pl on the terminal, it will still ask for the input... but I thought it should not do this.#!/usr/bin/perl use strict; system( "perl /tmp/ask_input.pl" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Altering Behavior of a Script
by ikegami (Patriarch) on Sep 03, 2009 at 20:43 UTC | |
by bichonfrise74 (Vicar) on Sep 03, 2009 at 20:47 UTC |