Hello rsFalse,
perl -le '$_ = "a"; print length . '' ? "A" : "B" '
The one-liner terminates at the second '. Try using "" for the empty string instead of '' here:
1:34 >perl -le "$_ = 'a'; print length . '' ? 'A' : 'B'" A 1:34 >
(but my single and double quotes are reversed because I’m on Windows.)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: parsing 'length ...'
by Athanasius
in thread parsing 'length ...'
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |