in reply to Reading part of a file name
Lhamo_rin, i don't know what you are really going to achieve, but as per your input and output, i assume, you can accomplish using regex as shown below.
$filename = 'FileName'; #any filename $string = 'FileName.089-09_08_45'; $string =~ s/^$filename\.(\d{2})\d/$1/; print $string; output: 08-09_08_45
Prasad
|
|---|