in reply to substring extraction
Do you want to remove the substring from the larger string or pull it out for processing? I'm getting hung up on your choice of "extract."
If your data is consistent with:
WX 200 A string of interest 86.34 0906 WTTS 320 Peer here my peer 17.34 1001 XGR 400 Please take me with you 19.87 1201 You could:while(<STRING_SRC>) { /[A-Za-z]+ [0-9]+ (.*)?[0-9.]+ [0-9]+/; $dotoit = $1; do_func $dotoit; }The regular expression assigns your string to $1. If you need to extract, as in pull out, the value thenwhile(<STRING_SRC>) { /[A-Za-z]+ [0-9]+ (.*)?[0-9.]+ [0-9]+/; $dotoit = $1; s/$dotoit//; fund_do $dotoit; }Be Appropriate && Follow Your Curiosity
- Comment on Re: substring extraction