substr('abcdefg',3,2)
returns 'de' (as expected)
However,
@a = (3,2); substr('abcdefg',@a)
returns 'cdefg'
What? I mean to say, "What?"
I care because I'd like to do this: substr($string,a_subroutine_call_that_returns_offset_and_length(@some_args))In reply to substr odd behavior with list arguments by wfischer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |