Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: concatenating partially uninitialized values

by Arguile (Hermit)
on Jun 18, 2003 at 18:05 UTC ( #266935=note: print w/replies, xml ) Need Help??

in reply to concatenating partially uninitialized values

If you know that you specifically want to use uninitialised variables, turn that warning off. It’s meant to help, not hinder you.

no warnings qw(uninitialized);

In this case, your two code snippets produce different results (the hyphen-minus is omitted in the second) so I wouldn’t suggest this technique. Be aware it’s there if you need it though.


Before 5.6 this was only possible using $^W which turned off all warnings. Be very careful if you do that.

use warnings; # This will generate a warning. print undef; { no warnings qw(uninitialized); # This won't. print undef; }

See Also

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://266935]
[Your Mother]: Roger, will co.
[Your Mother]: The good news is, they think they are influencing people but Americans at least are irretrievably biased. All that can be accomplished is a little spike in domestic violence. :P
[LanX]: YM: watch your mouth or I'll show up with my automatic gun at your nursery ...
[LanX]: ;-P

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2018-03-19 13:27 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.