use strict; use warnings; print <<'JONAG'; Do you want to print the program's 1. default strings in reverse order 2. or enter your own to be reversed ? Choose option 1 or 2 or q to quit JONAG my $choice = ; chomp $choice; if ($choice eq 'q') { print "quitting\n"; exit; } # This is the default value. my @lines = qw( wrda vzc rregr zfgr bzfgzffg rergrge d fgsrg rwer ds vsgsrg ); if ($choice == 2) { print STDERR "enter your own strings\n"; chomp(@lines = ); } foreach my $line (reverse @lines) { print "\t$line\n"; } #### print "do you want to print the program's\n", "1. default strings in reverse order\n", "2. or enter your own to be reversed ?\n"; #### print <<'JONAG'; Do you want to print the program's 1. default strings in reverse order 2. or enter your own to be reversed ? Choose option 1 or 2 or q to quit JONAG #### chomp $choice; if ($choice eq 'q') { print "quitting\n"; exit; } #### my @lines = qw( wrda vzc rregr zfgr bzfgzffg rergrge d fgsrg rwer ds vsgsrg ); #### foreach $line (@proglines) { $line = "\t$line"; $line .= "\n"; } print "@proglines"; #### foreach my $line (@proglines) { print "\t$line\n"; } #### print map { "\t$_\n" } @proglines;