How are you "calling" A? You can use qx aka backticks and just discard the output. Or else, following your logic, you can just re-open STDOUT to where you like most, e.g. an "in-memory" file (see open) or to a suitable actual file, including say /dev/null (assuming you're on *NIX).