in reply to Re^2: Strange Behaviour with Backticks
in thread Strange Behaviour with Backticks
But, the strange thing in my setting is that one parameter ('A') works well, but not the other ('B')?
From what I understand of your statement above, under both parameters the system call should fail. Please correct me if I'm wrong.
There's nothing preventing the program from behaving differently in different branches of the code depending on command line options.
if( $ARGV[0] eq 'A' ) { print "I work for a TTY only\n" if -t STDOUT; } if( $ARGV[0] eq 'B' ) { print "I work regardless of TTY-ness of STDOUT\n"; }
Having said that, one possibly might not call that "expected" behaviour (and if it were the case one would certainly be reasonable in expecting it to be documented). I was just tossing it out as something to be aware of.
|
|---|