[ic] order route

George Schindler george@1stomni.com
Mon, 19 Feb 2001 14:45:37 +0100


Hello,

I'm trying to implement order_routing and I use in my checkout.html page
this code

[perl arg=carts interpolate=1]
	  my $string = <<'EOF';
          [item-list][item-code]  [item-field dl_type]
        [/item-list]
        EOF
          my @items;
          my %route;
          @items = grep /\S/, split /\n+/, $string;
          for(@items) {
              my ($code, $keycode) = split /\t/, $_;
              $route{$code} = $keycode;
          }
          my $cart = $Carts->{'main'};
          my $item;
          foreach $item ( @{ $Carts->{'main'} } ) {
          $item->{mv_order_route} = $route{$item->{'code'}} || undef;
    }
    return '';
[/perl]

but there is some error in

	  my $string = <<'EOF';
          [item-list][item-code]  [item-field dl_type]
        [/item-list]
        EOF

this code, but error.log has written

pf.1stomni.com CHAV6xam:1stomni.com - [19/February/2001:08:34:43 -0500]
construct /cgi-bin/construct/process.html Safe: Can't find string terminator
"EOF" anywhere before EOF at (eval 875) line 2.
>
>
>     my $string = <<'EOF';
>     os28004
>     os28108
>     EOF

I'm not too much good in perl, but I see, that EOF is there :-)), so what is
problem...?
Thanks for some idea.

George