<$ perl -lanF',' -e "print join',',map {$_ ? $_ : 'NULL'} @F " 1.txt Bareword found where operator expected at -e line 1, near "1.txt" (Missing operator before txt?) Bareword found where operator expected at -e line 1, near "1.txt" (Missing operator before txt?) syntax error at -e line 1, near "1.txt " Execution of -e aborted due to compilation errors.