Wes said:
For what it's worth, never in my decades of Usenet use can I remember
asking a question without doing some research.
Good! Unfortunately, that puts you in the vast minority.
With perl, usually
I spend 5-10 minutes with perltoc or perlfaq or ... trying to figure out
which of the 131 perl man pages (157 K lines) to look in, 5-10 minutes
figuring out it ain't in that one,
I can understand that frustration. But in this case, it seemed obvious
that if you are having a problem with split(), then you should look at
the docs for split().
You don't have to believe me, but the biggest problem was that in spite
of having been doing off and on perl for ten years, I actually did not
realize the implications of trying to treat "one item" as if it were "a
list containing one item" as being the same.
I believe you just fine. That's not a completely foolish error to
make. My problem was that you gave no indication you had attempted to
solve the problem for yourself. If you had simply said "I read
`perldoc -f split`, but I still don't understand this warning. . . "
I'd have had no problem, and probably wouldn't have posted at all.
In other words, _others_ foolishly gave me the answer,
As I noted in the very first line of my post.
while you nobly upheld the finest
traditions of Usenet by bestowing upon me well-deserved and elegantly
worded contempt for my lack of skill at navigating the stacks of the
awesome Perl Public Library.
No no. I bestowed upon you contempt for seemingly not attempting to
help yourself before asking thousands of other people to help you.
Read the Posting Guidelines for this group. They will inform you that
your best bet to receive help is to explicitly state what you have
tried to solve your problem on your own. By not stating any such
thing, you implied that you had made no effort.
Indeed, if you had said that you read the docs, but still didn't
understand the warning, then we could have deduced that you did not
understand that assigning to a scalar was forcing split() to be called
in a scalar context, and could have helped you better.
(FWIW, this exact issue happened to me about a year ago in this group -
I was seeing odd behavior with the .. operator, and read the docs, but
my post did not indicate that. I was justly chided for not reading the
documentation, when in fact the issue was me not realizing my code was
using .. in a scalar context:
http://groups.google.com/group/comp...ul+author:Lalli&rnum=1&hl=en#66a7666442c770f2
)
OTOH, I realize not everyone agrees with those traditions.
For example, Larry Wall: "There ain't nothin' in this world
that's worth being a snot over."
I am truly sorry if you considered my post to be snotty. That was not
the intent. The intent was both to inform you of where you could have
found the answer on your own, and to help anyone lurking learn where
they could have found the answer had they had a similar problem.
Regards,
Paul Lalli