It seems that @gets@ reads from “files” that it finds in ARGV, and it seems GLI leaves the command in ARGV (I believe GLI makes a copy of ARGV and leaves the original alone). Really strange behavior, but you can get around it by doing @STDIN.gets@ to explicitly read from the standard input.