#! /usr/bin/perl -l while (<>) { chomp; print '"'.quotemeta.'"' if /^[\$\w]+$/; }