[ic] Strange whitespace

DB db at m-and-d.com
Sat Mar 4 15:14:00 UTC 2023


>> I think this mysterious whitespace is why my query is failing. The below 
>> code displays
>>
>> | BS | instead of the expected |BS|
>>
>> I can't tell where these spaces are coming from and I can't get rid of 
>> them. I use the pipe characters to make spaces easier to spot.
>>
>> [tmp ol_sku_test]BS-12345[/tmp]
>>
>> [tmp sku_prefix2]
>> [perl]
>> my $ol_sku_test = "[scratch ol_sku_test]";
>> my @sku_array = split('-', $ol_sku_test);
>> return "@sku_array[0]";
>> [/perl]
>> [/tmp]
>>
>> |[scratch sku_prefix2]|
>>
>> Any thoughts are welcome!
> 
> That's because [tmp sku_prefix2]...[tmp] includes the new lines around
> the [perl]
> 
> Try this:
> 
> 
> [tmp sku_prefix2][perl]
> my $ol_sku_test = "[scratch ol_sku_test]";
> my @sku_array = split('-', $ol_sku_test);
> return "@sku_array[0]";
> [/perl][/tmp]
> 
> |[scratch sku_prefix2]|
> 
> -- 
> Marco


Thanks that was indeed the issue. I guess I did not expect newlines to 
magically become spaces, and for some reason I could not filter them 
out. Also thanks to Racke - his quoting advise was of course correct.

DB


More information about the interchange-users mailing list