eyal edri wrote: > Hello, > > I keep getting this error and it drive me nuts. ('Use of uninitialized > value in string eq' ) > i'll add a snippet from my code which produces this error: ... my $missingPatch = "no"; ... > if ( $missingPatch =~ m/yes/ ) --- > this is where the error occurs. > (i've tried also $missingPatch eq 1) or '1' or "1" ... . > { ...... } > > I can't understand why perl shouts about this, since this var has been > initialized. > (also tried removing use strict)
Personally I'd use 0 and 1, but yes and no should work and I'd use if ($missingPatch eq 'yes') { rather than the RE. Since I can't run this other than just checking the syntax, there might be something in the code you removed that's causing it. Maybe any extra brace in there or some such that puts the var out of scope. _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs