#!/usr/pkg/bin/perl if (length(@_)) { quoteprint(<>); } else { quoteprint(); } sub quoteprint() { foreach (@_) { chop; printf("\"%s\"\n", $_); } }