Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: beginner scripting question re: if elsif else

by BillKSmith (Vicar)
on Oct 12, 2012 at 03:06 UTC ( #998591=note: print w/replies, xml ) Need Help??


in reply to beginner scripting question re: if elsif else

You must remove the newline from each input before you test it. Use the function chomp.
Bill
  • Comment on Re: beginner scripting question re: if elsif else

Replies are listed 'Best First'.
Re^2: beginner scripting question re: if elsif else
by live4tech (Sexton) on Oct 12, 2012 at 10:49 UTC

    Just a note, jhumphreys did chomp the input in the original program:

    chomp($weather, $temperature);

    Not the syntax I would use (would be more idiomatic and chomp at input as some of the posters did), but nonetheless, the newlines should be gone.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998591]
help
Chatterbox?
[LanX]: corion only > 800 lines
[stevieb]: ahhh you're talking about the actual Makefile, not the PP Makefile.PL
[Corion]: LanX: But most of that is just setup of variables to be used later, like CC , LIB etc.
[LanX]: yes and some builders try to avoid it
[RonW]: :)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2017-08-18 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (310 votes). Check out past polls.

    Notices?