Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    
  2. or download this
    Print “enter a 4 digit number:\n”;
    
  3. or download this
    print "enter a 4 digit number:\n";
    
  4. or download this
    Test: {
    my $number = <STDIN>;
    chomp $number;
    
  5. or download this
    If $number !=~ /[0-9][0-9][0-9][0-9]/{
    
  6. or download this
    if $number !~ /^[0-9][0-9][0-9][0-9]$/ {
    
  7. or download this
        Print “try again – 4 digits\n”;
    
  8. or download this
        print "try again – 4 digits\n";
    
  9. or download this
        Redo TEST;
    
  10. or download this
        redo Test;
    
  11. or download this
        }
    }
    
  12. or download this
    #!/usr/bin/perl
    use strict;
    ...
        redo Test;
        }
    }