#!/usr/bin/perl -w use strict; $ENV{'PATH'}=''; # removing this line makes it work open (MAILQ, "/usr/bin/mailq |") or die "open failed: $!\n";