[ic] Strange whitespace
Marco Pessotto
marco at pessotto.hr
Fri Mar 3 20:12:20 UTC 2023
DB via interchange-users <interchange-users at interchangecommerce.org> writes:
> 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
More information about the interchange-users
mailing list