Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Wed, 27 Apr 2005 14:50:47 -0700
Jay Savage wrote:
4> open (V4, "samcmd v4 2>\&1 |" ) || die "unable to open pipe... Broken?$!";
Don't do this. the precedence of || is too high. your code attempts to open a pipe, and if it can't, then it attempts to open "die..." and starts throwing exceptions.
No, that is NOT what happens, it will NEVER attempt to open "die..." with or without the parentheses. The ONLY time it will attempt to open "die..." is if there are no parentheses and the expression on the left hand side of the || operator evaluates to false.
open V4, '0' || die $!;
But even then it will NOT attempt to open "die..." because die() exits the program!
John -- use Perl; program fulfillment .
- Follow-Ups:
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: Jay Savage
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- References:
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: DBSMITH
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: Jay Savage
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- Prev by Date: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by Date: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Previous by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Index(es):
Relevant Pages
|