NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
kidding, right? (Score:1)
I mean, I use "HASH(0x1731300)HASH(0x174c918)" all the time.
I think I saw it on the fourth read-through.
If not a syntax error, at least a warning.
-- dagolden
Re:kidding, right? (Score:1)
I agree with Schern that it should be a warning, not a fatal error (I don't think it could be a syntax error since we don't know what's in those scalars at compile time).
A run time error would be bad for all the reasons Schern mentioned, but specifically because we all have debugging or logging code that does this. String interpolation shouldn't cause a run-time error. But since I've been bitten by this before I'm all in favor of it being a warning!
Reply to This
Parent
Re: (Score:1)
I was thinking that the concatenation would be the warning, not the interpolation.
Re: (Score:1)
But the concat is just one example of this problem isn't it? What about trying to use the wrong point in a nested data structure in a string? I've often used some 1 element array ref as a string because I missed something in some module's API.