Sep. 1st, 2010

pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
[personal profile] pauamma
Context was someone asking why
print "Hello, world!\n" && die;
doesn't output anything. Someone replied with a nifty trick to help figure this out:
perl -MO=Deparse -e 'print "Hello, world!\n" && die;'
or
perl -MO=Deparse,-p -e 'print "Hello, world!\n" && die;'
(go ahead and try it).

Note: -p won't make a difference here, but it helps if you suspect perl's notion of operator priorities is different from yours.

(crossposted from http://dw-dev-training.dreamwidth.org/23661.html at pne's suggestion)

Profile

command_liners: A command line prompt with a blinking cursor after it, green against black. (Default)
Command Liners

January 2022

S M T W T F S
      1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 4th, 2025 04:39 pm
Powered by Dreamwidth Studios