$ perl -le " print for qw/ a b c Q r s / " > what $ perl -ne " print if 1 .. /Q/; " < what a b c Q