in reply to Get the $main value when use local

AFAIK, you can't. That's the whole point about local. Any good reason why you need to use local instead of my? You may try giving a peek into Coping with Scoping and Seven Useful Uses of local for insightful info.

As a side note, read perldoc perlvar to find out why as a general rule $a should not be used as a general purpose variable.

Update: all in all your test code may have been written like thus:

#!/usr/bin/perl -l $c='main'; { local $c='sub'; print $c; print $main::c; } print $c; __END__