in reply to Problem in perl/tk
#! /usr/bin/perl use warnings; use strict; my $country = 'Pakistan'; my $province = 'Punjab'; my $region = 'Asia'; my $counter = 1; my $sequenceid = substr $region, 0, 1; $sequenceid .= substr $country, 0, 2; $sequenceid .= substr $province, 0, 2; $sequenceid .= sprintf '%07d', $counter; $sequenceid = uc $sequenceid; print $sequenceid, "\n";
To get a file path from the user, use Tk::FileSelect or Tk::getOpenFile.
Most of the contents of your post was irrelevant to the question. Please, try to study Short, Self Contained, Correct Example to learn how to ask good questions.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|