#!/usr/bin/perl -w

my $title = '$text7';
my $file = '/tmp/device';
my $content;
my $line;
my $retValue;

open(my $fh, '<', $file);
foreach $line (<$fh>) {
    chop($line);
    $content .= " $line";
}

my $cmd = "kdialog --menu \"$title\" $content 2>/dev/null --title 'Disks'";
$retValue = `$cmd`;
print "$retValue";