Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Trying to compare a string...

by calebcall (Sexton)
on Oct 18, 2013 at 08:02 UTC ( #1058714=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($genres[0] eq 'Science Fiction' || 'Sci-Fi' || 'Fantasy') {
        $genre = 'Sci-Fi & Fantasy';
    ...
    }else {
        $genre = $genres[0];
    }
    
  2. or download this
    print "Genres: $genres[0]\n";
    print "Genre: $genre\n";
    
  3. or download this
    Genres: Action
    Genre: Sci-Fi & Fantasy
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2016-07-25 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (223 votes). Check out past polls.