Hello SavannahLion,
You were so close! In list context, the matches are returned as a list, not an array, and you can subscript a list, so just remove the initial $ (and no need to put $k into parentheses):
$k .= ($t =~ /^\s*(.*?)\s*$/g)[0];
:-)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Appending a single Scalar after a match
by Athanasius
in thread Appending a single Scalar after a match
by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |