#!/usr/bin/perl -w use strict; while () { chomp; if ( ! -e ) { print "#$_\n"; } else { print "$_\n"; } }