Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Warning while using ternary operator

by Athanasius (Monsignor)
on Dec 16, 2013 at 12:49 UTC ( #1067325=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl
    use strict;
    ...
    print "\nBrowserUk's fix:\n\n";
    $hash->{name} = ($i eq 'one') ? "hello" . "world" : 'nothing';
    printf "name: %s, i: %s\n", $hash->{name}, $i;
    
  2. or download this
    22:46 >perl 801_SoPW.pl
    Useless use of a constant ("nothing") in void context at 801_SoPW.pl l
    +ine 21.
    ...
    name: helloworld, i: one
    
    22:46 >
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-09-30 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (384 votes), past polls