Step 1: Approach
Compare with the series of chlorine oxyacids, where the oxidation number rises with the number of oxygen atoms.
Step 2: The series
HOCl (one O) has Cl at $+1$. $\text{HClO}_2$ (two O) has $+3$. $\text{HClO}_3$ (three O) has $+5$. $\text{HClO}_4$ (four O) has $+7$.
Step 3: Place our molecule
$\text{HOClO}_2$ has one O in the OH group and two more on Cl, so three O in total. It is $\text{HClO}_3$.
Step 4: Check by sum
\[ +1 + x - 6 = 0 \Rightarrow x = +5 \]
This matches option (B).
Final Answer:
Chlorine in $\text{HOClO}_2$ has oxidation number +5, option (B).
\[ \boxed{+5} \]