Jul 18, 2006 #1 AMiSM Technical User Joined Jan 26, 2006 Messages 128 Location US Greetings! Does anybody know how to use a regular expression in the eval portion of an 'if' statement? This doesn't work: if ( $text[$z] ne m/\231/g ) { $output = "$output $text[$z]"; } I'm trying to execute code if the string does NOT contain ASCII #231.
Greetings! Does anybody know how to use a regular expression in the eval portion of an 'if' statement? This doesn't work: if ( $text[$z] ne m/\231/g ) { $output = "$output $text[$z]"; } I'm trying to execute code if the string does NOT contain ASCII #231.
Jul 18, 2006 #2 raklet MIS Joined Aug 19, 2003 Messages 370 Location US if ( $text[$z] ne m/\231/g ) { should be like this: if ( $text[$z] !~ m/\231/g ) { Upvote 0 Downvote
Jul 18, 2006 Thread starter #3 AMiSM Technical User Joined Jan 26, 2006 Messages 128 Location US I was close Thanks, man Upvote 0 Downvote