Gah, I've been playing with Python too much. You're right. | [reply] |
So there is no single function that does that...well, that just sucks. I was hoping I could do it without needing seek(), but I guess if that's the only way, I don't have much of a choice. Isn't there a website somewhere where you can suggest features for the next version of Perl? That would be at least the second thing that I could think of.
| [reply] |
sub printAt {
my( $fh, $src, $nChars, $offset ) = @_;
seek $fh, $offset, 0;
return print $fh substr $src, 0, $nChars;
}
printAt( $fh, $s, 4, 1234 );
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |