in reply to Script failed with certain value in the variable

First troubleshooting step is to add strictand warnings:

#!/usr/bin/perl use strict; use warnings; use Getopt::Long;

This identified several problems. The first one is:

S:\Steve\PerlMonks>perl .\tparse.pl --platform=1 --version=E48.1 Bareword found where operator expected at .\tparse.pl line 25, near "$ +version will" (Missing operator before will?)

Something's wrong on line 25. After my additions noted above, lines 22-26 are:

if (!defined($version)) { Find version number!! $version = E . "$valuefind"; ($version will be E48.2) }

My guesses:

  1. Find version number!! is presumably meant to be a comment. (As posted, it's not one.)
  2.  $version = E . "$valuefined";is probably meant to put a literal 'E' into the result. I'm old-fashioned; I'd put quotes around it.
  3.  $valuefindis not defined anywhere, yet you appear to be trying to reference it.
  4.  ($version will be E48.2)is presumably mean to be a comment. (As posted, it's not one.)