in reply to Suppression of Output Message

Is there any reason that you aren't using a built in file test?
$counter = -e "/tmp/myfile.txt";
That is less code, doesn't launch a new process, and you won't run into trouble if you're passed a filename with things like spaces in it.

To learn more about the available filetests in Perl, check out http://perldoc.perl.org/functions/-X.html.

Replies are listed 'Best First'.
Re^2: Suppression of Output Message
by bichonfrise74 (Vicar) on Sep 09, 2008 at 22:43 UTC
    Interesting! I've used file tests before but not in this manner. Thanks! I will try this out.
Re^2: Suppression of Output Message
by Lawliet (Curate) on Sep 09, 2008 at 19:37 UTC

    I'd ++ but gots no moar votes left :(

    That being said, I second this idea.

    I'm so adjective, I verb nouns!

    chomp; # nom nom nom