Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Unexpected effect of -w with undef

by Stevie-O (Friar)
on Dec 22, 2004 at 16:29 UTC ( #416811=note: print w/ replies, xml ) Need Help??


in reply to Unexpected effect of -w with undef

Ahh, a case of syntactic sugar deceiving the user.

You're probably thinking that the '-w' is supposed to cause warnings to be reported. And normally, it is.

However, the the first thing following -e is the script. And that's not the mini-script you wrote: it's the string 'w'. Perl treats that as a bareword and thinks you wrote a script that consists solely of the string 'w', which in a void context doesn't do anything. The 'if (undef() eq undef())...' is the first thing in @ARGV.

Change your perl -ew to perl -we and you might get something more like what you expected.

--Stevie-O
$"=$,,$_=q>|\p4<6 8p<M/_|<('=> .q>.<4-KI<l|2$<6%s!<qn#F<>;$, .=pack'N*',"@{[unpack'C*',$_] }"for split/</;$_=$,,y[A-Z a-z] {}cd;print lc


Comment on Re: Unexpected effect of -w with undef
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://416811]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (18)
As of 2014-07-30 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (234 votes), past polls