in reply to oneliner cat like capability
Another handy thing to know about is B::Deparse which will dump out the code as perl interprets it. If you use it with your oneliner you can see both print calls (from your argument to -e and the implicit one from -p in the generated continue block).
$ perl -MO=Deparse -pe 'print' LINE: while (defined($_ = <ARGV>)) { print $_; } continue { die "-p destination: $!\n" unless print $_; } -e syntax OK
Depending on what you're trying to figure out there's options to B::Deparse which can be useful like -p to add explicit parens everywhere (-MO=Deparse,-p,-q is another handy variant).
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|