my $filename = "000231263444_01_XY_20130110_061717.txt"; #after getting it with reg exp. my $accountnumber = '000231263444';