Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    foreach my $line (reverse @lines) {
        print "\t$line\n";
    }
    
  2. or download this
    print "do you want to print the program's\n", "1. default strings in r
    +everse order\n", "2. or enter your own to be reversed ?\n";
    
  3. or download this
    print <<'JONAG';
    Do you want to print the program's
    ...
      2. or enter your own to be reversed ?
    Choose option 1 or 2 or q to quit
    JONAG
    
  4. or download this
    chomp $choice;
    if ($choice eq 'q') {
        print "quitting\n";
        exit;
    }
    
  5. or download this
    my @lines = qw( wrda vzc rregr zfgr bzfgzffg rergrge d fgsrg rwer ds v
    +sgsrg );
    
  6. or download this
    foreach $line (@proglines) {
        $line = "\t$line";
        $line .= "\n";
    }
    print "@proglines";
    
  7. or download this
    foreach my $line (@proglines) {
        print "\t$line\n";
    }
    
  8. or download this
    print map { "\t$_\n" } @proglines;