in reply to cut in perl

It isn't clear if you're trying to cut the string in $envUpr or a file name that $envUpr names, but you would want to use something like the following instead...

$envUpr = qx[echo $envUpr | cut -c3-6]; # string $envUpr = qx[cut -c3-6 $envUpr]; # file

However, a more Perlish way of cuting a string is to use substr, like so...

$envUpr = substr( $envUpr, 2, 5 ); # offsets from 0 not 1

    --k.