Well, many of the legal questions have been answered well and similarly to my views on it: give credit where credit is due, and read the license.
On to when a program becomes yours. When you are first learning any language, a lot of the learning process is based on assimilation. But as you learn, you take what you have assimilated and begin using it logically on things that you create yourself. You can give a base level programmer a simple algorithm (say a bubble sort) and knowing the in's and out's of loops and variables, they can create a rather ugly program that performs the sort. It's not optimized, and it's probably not the best way to approach a bubble sort, but it's theirs because they created it from scratch. But they had to use knowledge and specs created or evolved by others.
I don't think learning is a wizz-bang process. It's more of an evolutionary process, whereas we gather information from a wide variety of sources and use it to the best of our ability, hopefully crediting those sources if we even realize who they are.
Now, cutting and pasting code is a different matter since you usually know where the code originated and from who (at least most modern code). These people should always be credited, and contacted if your project was significantly helped by them.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.