  The statistics of the ground-state and domain-wall energies for the
two-dimensional random-bond Ising model on square lattices with independent,
identically distributed bonds of probability $p$ of $J_{ij}= -1$ and $(1-p)$ of
$J_{ij}= +1$ are studied. We are able to consider large samples of up to
$320^2$ spins by using sophisticated matching algorithms. We study $L \times L$
systems, but we also consider $L \times M$ samples, for different aspect ratios
$R = L / M$. We find that the scaling behavior of the ground-state energy and
its sample-to-sample fluctuations inside the spin-glass region ($p_c \le p \le
1 - p_c$) are characterized by simple scaling functions. In particular, the
fluctuations exhibit a cusp-like singularity at $p_c$. Inside the spin-glass
region the average domain-wall energy converges to a finite nonzero value as
the sample size becomes infinite, holding $R$ fixed. Here, large finite-size
effects are visible, which can be explained for all $p$ by a single exponent
$\omega\approx 2/3$, provided higher-order corrections to scaling are included.
Finally, we confirm the validity of aspect-ratio scaling for $R \to 0$: the
distribution of the domain-wall energies converges to a Gaussian for $R \to 0$,
although the domain walls of neighboring subsystems of size $L \times L$ are
not independent.
