This seems like a bit of a misuse to me - you need the () to identify what's your match.
http://perldoc.perl.org/perlre.html
Capture buffers
The bracketing construct ( ... )
creates capture buffers. To refer to
the current contents of a buffer later
on, within the same pattern, use \1
for the first, \2 for the second, and
so on. Outside the match use "$"
instead of "\". (The \ notation
works in certain circumstances outside
the match. See the warning below about
\1 vs $1 for details.) Referring back
to another part of the match is called
a backreference.
So basically you can use
if ($str =~ /^0+(.)/) { print "matched $1"; }
If you have more than one grouped matches they will be $1, $2, $3... etc e.g.
if ($str =~ /(0*)(1*)/) { print "I've got $1 and $2"; }