sub gc_frac { local $_ = @_? shift : $_; 2 * (() = /(gc)/gi ) / length; } print gc_frac('AAgcTT'),$/