Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2014-09-24 01:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (243 votes), past polls