There are three primary ways to make an anhydrous HCl solution, each with their own pros and cons. I’ll start with the safest (and smallest scale) and move up from there.
Via Acyl/Silyl/Thionyl Chlorides
If your reaction is in a protic solvent (methanol, ethanol) addition of AcCl will lead to formation of HCl gas (TMS-Cl has also been championed). If the addition rate is kept slow and the solvent kept near 0℃ most of this gas will diffuse into solution, though you may hear minor popping noises .
At -78℃ AcCl is discouraged, as it tends to oil out, only reacting as the vessel is warmed. SOCl2 doesn’t suffer from these drawbacks, but is pretty reactive at room temperature. (tender/button, comment 18)
Generation of Dry HCl
For larger quantities of HCl and/or aprotic solvents you’ll need to generate the gas yourself. This can be done via controlled addition of either H2SO4 or HCl onto a chloride source, with all recipes sharing a common apparatus.
Acid passes through the dropping funnel onto the chloride source. This produces HCl(g), which bubbles up and through the sidearm into the receiving vessel. If the gas needs to be stringently dry, this receiving vessel will contain a small amount of H2SO4 and a second sidearm; otherwise it will be filled with chilled solvent. The septa has been cored to allow the pipette to drive through it (obviously, metal needles should not be used). Stir plates/bars are not shown.
There are three common mixes:
Mix A) H2SO4 is added to HCl(aq).
Mix B) H2SO4 is added to NaCl.
Mix C) HCl(aq) is added to a drying agent; CaCl2 or MgSO4.
On the advice of a chem guru, I started out using mix B, adding sulfuric acid to sodium chloride. This generated a steady, easily controlled stream of HCl(g), but the solid NaHSO4 byproduct was rather irritating to cleanup. While I haven’t used it myself, I’ve heard good things about mix A , and would recommend that one to a new chemist. In all cases the concentration of HCl in the ethereal solvent should be verified afterwards via titration [3, 4].
Purchasing Dry HCl
Small (less than 1L) quantities of ethereal HCl are sold by most chemical companies, with TCIAmerica giving the best deal on a cursory search. For large quantities you’ll probably have to turn to a lecture bottle, which works like a mini nitrogen tank, dispensing gas on demand. This is of course very convenient when large quantities are required, but when things go wrong they have a tendency to go very wrong.
 This trick goes all the way back to the first edition of Fieser and Fieser, in 1967.
 I came across this fairly comprehensive writeup via google. The rest of the site has a definite focus on… real world applications.
 I haven’t been able to find a classic titration setup online. My gut instinct would be to use an ether soluble base such as triethylamine, and a hydrophobic indicator like triphenylmethanol. Only a suggestion, though.
 Ethereal hydrogen chloride is very useful for purifying amines. The free base will be well soluble in diethyl ether, along with most types of impurities, while added ethereal HCl will cause the hydrochloride salt to crash out.