Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Don't get the output as expect.

by frozenwithjoy (Curate)
on Jun 05, 2013 at 20:38 UTC ( #1037302=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Don't get the output as expect.
in thread Don't get the output as expect.

Glad to hear. Be sure to declare your variables with my so that everything will run when you have use strict; in effect.

Also, you may want to change this:

if ($answer eq "y")

to something like this:

if ( $answer =~ /^y/i )

That way, it will match Y y Ya yes yup Yar, etc. and let you remove two lines of code since you will no longer need to chomp $answer;.


Comment on Re^3: Don't get the output as expect.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (16)
As of 2015-07-31 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls