That's odd. what you say works in every instance except when trying to print it immediately. Fortunately i don't need to, but that's just an odd twist. I had been trying to print it right away for my testing, which is why it didn't work, i'd say. thanks
@:::::::((==========Rydor====> | [reply] |
...works in every instance except when trying to print it immediately.
You're probably running afoul of the function vs. "list operator" nature of builtin's when called with and without parentheses, respectively. Specifically, perl sees that first parenthesis and says to itself, "Oh! That must be a function call," when, really, you want those parentheses to create a list that you can then subscript. So you end up subscripting the return value of print (ie, a list containing a single element: (1)) Try:
print +(split(...))[3]; # force "list operator" mode, or...
print( (split(...))[3] ); # make the whole thing a function call.
Update: Elucidated exactly what I meant by "running afoul". :-)
bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are. | [reply] [d/l] [select] |
yeah, i see how those paranthesis mess that up. thanks.
@:::::::((==========Rydor====>
| [reply] |