Charlies dead

Why, if somebody's petticoat is showing, do we say 'Charlies dead'?