$ perl -MO=Deparse,-p,-q -E 'print $ads{$this_ad} "$line\n";' String found where operator expected at -e line 1, near "} "$line\n"" (Missing operator before "$line\n"?) syntax error at -e line 1, near "} "$line\n"" -e had compilation errors. $ perl -MO=Deparse,-p,-q -E 'print { $ads{$this_ad} } "$line\n";' use feature 'current_sub', 'bitwise', 'evalbytes', 'fc', 'postderef_qq', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; print({$ads{$this_ad};} ($line . "\n")); -e syntax OK