Help for this page

Select Code to Download


  1. or download this
    use strict;
    use diagnostics;
    ...
    }
    
    myprint( STDOUT, "Hello world!\n" );
    
  2. or download this
    Bareword "STDOUT" not allowed while "strict subs" in use at mytest.pl 
    +line 15.
    Execution of mytest.pl aborted due to compilation errors (#1)
    ...
    Uncaught exception from user code:
        Bareword "STDOUT" not allowed while "strict subs" in use at mytest
    +.pl line 15.
        Execution of mytest.pl aborted due to compilation errors.
    
  3. or download this
    use strict;
    use diagnostics;
    ...
    }
    
    myprint( STDOUT, "Hello world!\n" );
    
  4. or download this
    Woops!
    Can't use string ("1") as a symbol ref while "strict refs" in use at m
    +ytest.pl
    ...
    Uncaught exception from user code:
        Can't use string ("1") as a symbol ref while "strict refs" in use 
    +at mytest.pl line 8.
        main::myprint(1, 'Hello world!\x{a}') called at mytest.pl line 15
    
  5. or download this
    use strict;
    use diagnostics;
    ...
    }
    
    myprint( \*STDOUT, "Hello world!\n" );