Chlorine and HCl acid (hydrochloric acid) are both of the halogen family, but they are very different in how they will react with metals.
Chlorine can oxidize metals, even metals below hydrogen in the reactivity series (although it normally requires heat to help in this process), it will react with copper, and it will even react with gold to take electrons from gold.
HCl acid will not react with copper or gold.
HCl acid (hydrochloric acid) is normally considered a non-oxidizing acid.
Chlorine will react with copper (normally heated to help this reaction), chlorine gas can be a strong oxidizer.
Even dissolved in water chlorine gas is an oxidizer, mainly as it forms HCl (Hydrochloric acid) and HClO (Hypochlorous acid) in this solution, the HClO is very unstable and begins to break down to HCl acid and oxygen, in this solution.
This is where Chlorine becomes an oxidizer for our gold when we use it with HCl acid (Note the HCl acid we use, and the bleach we add is mostly water), to dissolve our fine gold powder or foils in the process used by many here on the forum.
(Bleach being basic can help hold the HClO in solution a tiny bit longer as it somewhat lowers, the acids pH, but that is starting to get off topic here).
HCL acid (hydrochloric acid) will not react with copper unless an oxidizing agent is involved).
Note this oxidizer can be several things, if we are discussing copper, air or oxygen which can be in solution, some copper oxide in solution (which basically would form copper II chloride which can be an oxidizer for copper), H2O2…
This list can go on and on, the point here is; for HCl acid (hydrochloric acid) to dissolve copper the copper atoms must be oxidized (an electron taken from the copper atom first) by an oxidizing agent, HCl is not an oxidizing agent for copper.
HCl acid cannot oxidize copper alone. The chloride ion in HCl acid has a full shell of electrons, and will not take one from the copper, copper is below hydrogen in the reactivity series of metals, so the hydronium ion in HCl acid is happy just the way it is, and the copper (copper being below hydrogen in the reactivity series) will not displace the extra hydrogen from the hydronium ion (H3O), in this acidic solution.
HCl acid will react with metals above hydrogen in the reactivity series, the more reactive metals, but Note that it is not the chloride ions of the HCl acid, which is the oxidizing agent for these more reactive metals (or that is oxidizing these metals).
It is the hydrogen of the acid, or to be clearer, or precise, it is the hydronium ions H3O that reacts with these metals which are higher in series than hydrogen in the reactivity series of metals, or hydrogen here is the oxidizing agent for these more reactive metals, (for example zinc) hydrogen taking electrons from these metals as the Hydrogen is reduced to gas.
I think of the hydronium ion H3O as being acidic water, this is probably an improper way of thinking of it in the real scientific world but that’s how I tend to view it.
Chlorine Cl2-is a gas, this gas atom in its outer shell has 7 electrons, it really wants to have 8 electrons in its outer shell, it will take that electron from metals, to gt a full shell of 8 electrons, (oxidizing the metal atom to make metal ions) for something to be oxidized (lose of electron), something has to be reduced, in this case the chlorine is reduced (gain of electrons) the chlorine here is reduced to chloride.
So basically chloride, and metals will form a solution of the copper ions and chloride ions, basically a dissolved salt of copper chloride in solution.
Acid + base = salt
Acid + Metal = metal salt,
(Or a salt of that acid and the metal, which was involved in the reaction)
HCl (hydrogen chloride); (note the chloride here, with ide in its name), (also note also the chlorine here is reduced to chloride now having all of its electrons).
HCl (hydrogen chloride is a gas, HCl (g), a colorless gas with a sharp bite to the nose, heavier than air it will settle to the floor in your lab, HCl does not act as an acid, it is not an oxidizer of most metals, it is fairly happy with its hydrogen bond in this case.
HCl (g) (Hydrogen chloride) gas will react with water, in this case the solution becomes Hydrochloric acid, basically the hydrogen here joins with the water H2O to give the H3O hydronium ions in solution, mixed with chloride ions in solution (the extra hydrogen is what gives or makes this solution acidic).
This water can be in your lungs, breathing HCl gas can form hydrochloric acid in your lungs, or the moisture in the air making acid rain…
HCl(g) + H2O --> HCl acid
or to show this another way
HCl(g) + H2O --> H3O + Cl-
Notice above that the water H2O gained hydrogen, forming hydronium ions (H3O), and we also have that chloride ion in solution running around.
Copper is below hydrogen in the reactivity series of metals (so basically it will not displace hydrogen from the H3O hydronium ion) and we also know the chloride ion is just fat and happy with its full shell of electrons, and does not want, or care to take an electron from the copper atoms..
To say this another way the chloride is not an oxidizing agent for copper, or it will not take electrons from copper...
Basically when it comes to copper metal. Chlorine, and HCl gas, or HCl acid, are completely different, or two completely different animals in this zoo of chemistry, one will eat copper, while one will not.