Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
        print OUT "hello";
        close(OUT);
    }
    
  2. or download this
    1. use strict and use warnings;
    2. use the "$!" so you get the explicit error when there is one
    3. you didn't define $y - and it looks to be unnecessary for this
    4. you didn't close the FILE handles
    5. you need to specify the FILE handle you want to write to