in reply to reading values from file

Here's my go at it, with a nod to smokemachine:
print "debug mode\n" if shift; read INFILE, my $infile, -s '/path/to/infile'; #<- not specified in OP close(INFILE); my ($old_version) = $infile =~ /^.*?ver = '(.*?)'/; (my $projlabl = $projectPath) =~ s/\.pro/labeler/;