Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: check whether a array element is equal to a string.

by PeterPeiGuo (Hermit)
on Jan 10, 2011 at 04:07 UTC ( [id://881413] : note . print w/replies, xml ) Need Help??


in reply to check whether a array element is equal to a string.

Use $newline in your comparison.

Peter (Guo) Pei

  • Comment on Re: check whether a array element is equal to a string.

Replies are listed 'Best First'.
Re^2: check whether a array element is equal to a string.
by ritchie (Initiate) on Jan 10, 2011 at 04:46 UTC
    Thank you it works now, I have one more question, coupld you tell me whether this is the correct method to call a perl script from another script?
    if($size_EG12>0){ system "java StopMessageFlows"; foreach(@EG12){ do 'deploy.pl'; } }

      Your script already calls a java program, so simply call other perl scripts in the same way.

      Peter (Guo) Pei