in reply to extracting data

Sounds like a job for a pattern match:

$string =~/\/(\w+\.txt)/; print $1;

Update: Removed \d because, as Limbic~Region pointed out in the CB, \w matches \d's as well

--------------------------------------------------------------

"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."

John Brunner, "The Shockwave Rider".