[ic] Get value(s) out of mv_searchspec

Stefan Hornburg Racke interchange-users@interchange.redhat.com
Thu Apr 11 14:56:00 2002


Frank <fmueller@adva.de> writes:


[...]

> > >
> > > On ic 4.8 the [value mv_searchspec] is an array like 'ARRAY(0x8306eb0)'
> > > and not a string like "dmd016jpg" as it is on mv 3.14.
> > 
> > Try
> > 
> > [calc]
> > $rub = $Values->{mv_searchspec}->[0];
> > ...
> > [/calc]
> > 
> > Ciao
> >         Racke
> > 
> > --
> 
>  WOW, that worx
> 
>  here's the complete, now under ic 4.8 working code:
> 
>  [perl interpolate=1]
>  $rub = $Values->{mv_searchspec}->[0];
>  if ($rub  =~ /^dmd010/) {$txt = 'textstring 1'}
>  if ($rub  =~ /^dmd011/) {$txt = 'textstring 2'}
>  if ($rub  =~ /^dmd015/) {$txt = 'textstring 3'}
>  if ($rub  =~ /^dmd016/) {$txt = 'textstring 4'}
>  $out = "$txt";
>  $out; [/perl]

It is just an array ref :-)
Drop the interpolate=1, it is no longer needed (no ITL tags
inside [perl]).

Ciao
        Racke

-- 
Think of it !

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)