Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 browsing the Monastery: (5)
As of 2014-09-18 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (105 votes), past polls