my $os = $^O; my $text_os = $c->createText($x0+570,$y0+10,-text=>"ОС: $os", -font=>'bar_rus', -fill=>'#afb3b0',-anchor=>'s',-tags => ['os']); eval { if ($os =~ /Win/ig){ use Win32::SerialPort; #we're on Windows } else { use Device::SerialPort; #we're on Linux } }