[vienna.pm] pipe or die

Toni Andjelkovic toni at soth.at
Thu May 4 08:09:26 CDT 2000


* * * vienna-pm-list * * *


Johannes Fuernkranz wrote on Thu, May 04 2000 (13:40:18 +0200):
> open(IN,"non_existent_script |") or die "Script doesn't exist";

eventuell

  open(IN, "<foobar |") or die "open: $!\n";

oder du machst den check beim ersten read oder write auf
dieses filehandle.

der return-code ist deswegen immer ok, weil der prozess
"non_existent_script" geforkt wird, und der perl-parent
nur den return-code von fork() kriegt, glaub ich halt.

cu,
-- 
Toni Andjelkovic
toni at soth.at

###
You are subscribed to vienna-pm-list as Toni Andjelkovic <toni at soth.at>
http://www.fff.at/fff/vienna.pm/



More information about the Vienna-pm mailing list