Help for this page

Select Code to Download


  1. or download this
    $ alias perle
    alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -MCarp::Always -E
    +'
    
  2. or download this
    $ perle 'open my $fh, ">", "not_a_file"; say "$fh"; unlink "not_a_file
    +";'
    GLOB(0x8000c42e0)
    
    $ perle 'my $hashref = {}; say "$hashref";'
    HASH(0x800003bc8)
    
  3. or download this
    Bareword "STDERR" not allowed while "strict subs" in use ...
    
  4. or download this
    use strict;
    use warnings;
    
  5. or download this
    $ perle 'my $x = \*STDERR; say "$x";'
    GLOB(0x80008fcd0)
    
    $ perle 'my $x = *STDERR; say "$x";'
    *main::STDERR
    
  6. or download this
    $ perle 'my %fh = (err => \*STDERR); print {$fh{err}} "errmsg\n";'
    errmsg
    
    $ perle 'my %fh = (err => *STDERR); print {$fh{err}} "errmsg\n";'
    errmsg
    
  7. or download this
    $ perle 'my %fh = (err => \*STDERR); $fh{err}->print("errmsg\n");'
    errmsg
    
    $ perle 'my %fh = (err => *STDERR); $fh{err}->print("errmsg\n");'
    errmsg