sub calculateShipping {    my ( $picOptions ) = @_;    my $shippingCosts = undef;    if ( $picOptions->[ 9 ] || $picOptions->[ 8 ] || $picOptions->[ 7 ] || $picOptions->[ 6 ] ) {        $shippingCosts = $shipRolle;    }    elsif ( $picOptions->[ 5 ] ) {        if ( $picOptions->[ 5 ] > 64 ) { $shippingCosts = $shipRolle; }        elsif ( ( $picOptions->[ 5 ] > 32 ) && ( $picOptions->[ 5 ] < 65 ) ) { $shippingCosts = $shipMaxi; }        else { $shippingCosts = $shipKompakt; }    }    elsif ( $picOptions->[ 4 ] || $picOptions->[ 12 ] ) {        my $pictureNr =  $picOptions->[ 4 ] + $picOptions->[ 12 ];        if ( $pictureNr > 160 ) { $shippingCosts = $shipRolle; }        elsif ( ( $pictureNr > 87 ) && ( $pictureNr < 161 ) ) { $shippingCosts = $shipMaxi; }        else { $shippingCosts = $shipKompakt; }    }    elsif ( $picOptions->[ 3 ] || $picOptions->[ 2 ] || $picOptions->[ 1 ] || $picOptions->[ 10 ] || $picOptions->[ 10 ] ) {        my $pictureNr =  $picOptions->[ 3 ] + $picOptions->[ 2 ] + $picOptions->[ 1 ] + $picOptions->[ 10 ] + $picOptions->[ 11 ];        if ( $pictureNr > 160 ) { $shippingCosts = $shipRolle; }        elsif ( ( $pictureNr > 149 ) && ( $pictureNr < 161 ) ) { $shippingCosts = $shipMaxi; }        elsif ( ( $pictureNr > 13 ) && ( $pictureNr < 150 ) ) { $shippingCosts = $shipGross; }        elsif ( ( $pictureNr > 4 ) && ( $pictureNr < 14 ) ) { $shippingCosts = $shipKompakt; }        else { $shippingCosts = $shipStd; }    }    else { $shippingCosts = $shipKompakt; }    # 2 Nachkommastellen erzeugen, falls nur eine da    if ( $shippingCosts =~ /\.\d$/ ) {        $shippingCosts = $shippingCosts."0";    }    if ( $shippingCosts =~ /^\d$/ ) {        $shippingCosts = $shippingCosts.".00";    }    return ( $shippingCosts ); } # calculateShipping()