... From: Jeff japhy Pinyan To: firstname.lastname@example.org Sent: Saturday, December 03, 2005 2:31 PM Subject: Re: [PBML] Problem with if evaluation ...
Message 1 of 3
, Dec 3, 2005
----- Original Message -----
From: Jeff 'japhy' Pinyan
Sent: Saturday, December 03, 2005 2:31 PM
Subject: Re: [PBML] Problem with 'if' evaluation
On Dec 3, Bill Walton said:
> $position = index($filename,"xml");
> # This doesn't work. The 'test.sav' file is processed below.
> next if (not $position); # skip non-XML files
Did you read the documentation for the index() function? It returns -1 if the substring wasn't found in the string, NOT 0.
[BW] Yep. I read it. Just forgot that, in perl, '-1' was TRUE. Told you it was a 'stupid newbie' problem ;-) Sorry about that. And thanks for the reply, Jeff.
[Non-text portions of this message have been removed]
Your message has been successfully submitted and would be delivered to recipients shortly.