http://qs1969.pair.com?node_id=1184741


in reply to foreach type of deal?

One way to get rid of the g is to use the substitution operator (s///). This deletes the g if it is the 1st character on a line:
while (<>) { s/^g//; }