Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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?
[Discipulus]: i'd like to be the vote fairy just one month.. ;=)
[choroba]: My average XP per node lowered in the last three months :(
[choroba]: (check my homenode for the graph link and the tool to create it)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-04-26 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (474 votes). Check out past polls.