in reply to search file for text then only use some of the text in the line
Try this,
undef $/; $k=<DATA>; while ($k=~/<Directory Filename="([^"]+)"/g) { $value=$1; print $value; } __DATA__ <Directory Filename="hai" Version="1.9"> <Directory Filename="dai" Version="1.9">
|
|---|