CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Boolean with a string (http://www.cfd-online.com/Forums/cfx/117674-boolean-string.html)

Leackim May 13, 2013 10:04

Boolean with a string
 
Hi,

After some research i didn't find any answer about my questions. I would like to use Boolean "==" with a string.
I tried it in my file :

! if ($BOTTOM_TOP=="X"){
! $INTERSEC=1;
!}



(BOTTOM_TOP is a string)

But it appears that PERL can't make it. Is there any way to achieve it ?


Thanks

ghorrocks May 13, 2013 17:47

This is basic perl syntax - see http://perlmeme.org/howtos/syntax/comparing_values.html for details and the way to do it.


All times are GMT -4. The time now is 14:19.