Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^3: Warning while using ternary operator

by Athanasius (Chancellor)
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
    Useless use of a constant ("nothing") in void context at l
    +ine 21.
    name: helloworld, i: one
    22:46 >

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1067325]
[stevieb]: hmmm seems the C# library doesn't work right on win10. With berrybrew, only part of the perl portable zip is extracted. no errors nothing. Guess I have to look at switching out zip libraries. sigh

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2017-03-28 16:23 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (335 votes). Check out past polls.