Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Four annoying warnings

by tobyink (Abbot)
on Dec 09, 2012 at 00:05 UTC ( #1007936=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $price = sprintf "%d.%02d", $pounds||0, $pence||0;
    
  2. or download this
    my $price = sprintf "%d.%02d", $pounds, $pence;
    
  3. or download this
    print 'a' + 'b', $/;    # warns
    print []  + {},  $/;    # no warning
    
  4. or download this
    use v5.12;   # behaviour of split changed in 5.12.
    sub a { split //, 'xyz'; 1 }  a();  # warns
    sub b { split //, 'xyz' }  b(); 1;  # no warning
    
  5. or download this
    no warnings 'numeric';
    no warnings 'once';
    no warnings 'uninitialized';
    no warnings 'void';
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1007936]
Approved by GrandFather
Front-paged by Old_Gray_Bear
help
Chatterbox?
[karlgoethebier]: My perltidy adds a semicolon after .... How can i avoid this?
[LanX]: ellipse aka ... aka yadda yadda is a new command
[LanX]: sopw!
[1nickt]: Sorry kgb can't help there, not a perltidy user.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-11-18 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?