Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
        print "I saw the character [$&]\n";
        redo if $& eq 'e';
        }
    
  2. or download this
    I saw the character [f]
    I saw the character [r]
    ...
    I saw the character []
    Use of uninitialized value in string eq at test line 8.
    I saw the character [d]
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
        redo if $& == 5;
        last if $i == 10;
        }
    
  4. or download this
    I saw [1]
    I saw [2]
    ...
    I saw [8]
    I saw [9]
    I saw [10]
    
  5. or download this
    #!/usr/bin/perl
    use strict;
    ...
        redo if $& == 5;
        last if $i == 10;
        }
    
  6. or download this
    I saw [1] and [1]
    I saw [2] and [4]
    ...
    I saw [8] and [64]
    I saw [9] and [81]
    I saw [10] and [100]
    
  7. or download this
    #!/usr/bin/perl
    use strict;
    ...
        redo if $& == 1;
        last;
        }
    
  8. or download this
    I saw [1]
    Use of uninitialized value in concatenation (.) or string at test3 lin
    +e 9.
    I saw []