You do use strict and warnings, don't you? See also Equality Operators.use warnings; use strict; my @password = ('foo'); print "Do you want to export your password to a text file? (y/n) "; chomp(my $export = <STDIN>); $export = lc $export; if ($export eq 'y') { open (FH, '>>password.txt') or die $!; print FH "Your password is: ", @password, "\n"; close FH; } elsif ($export eq 'n') { print "Your password is: ", @password, "\n"; } else { print "Enter either y or n to continue. \n" ; }
In reply to Re: Text output problem
by toolic
in thread Text output problem
by rspishock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |