#!D:/perl/bin/perl.exe -wT use strict; use CGI qw/:standard/; use SOAP::Lite +autodispatch => uri => 'http://192.168.1.26/Temperatures', proxy => 'http://192.168.1.26/soap/temper.cgi'; my $temp = param( 'temp' ); my $type = param( 'type' ) || ''; my $format = param( 'format' ) || ''; $temp = '' if ! defined $temp; ($temp) = $temp =~ /([\d.]+)/; ($type) = $type =~ /([cf])/; my $temp_result; if ( $temp ) { my $temperature = Temperatures->new; $temperature->format( $format ) if $format; $temp_result = $type eq 'c' ? $temperature->c2f( $temp ) : $temperature->f2c( $temp ); }