Help for this page

Select Code to Download


  1. or download this
    my $scan = 'foo';
    # here $scan == 'foo';
    ...
    
    # now the $scan we defined in the if() {} is out of scope,
    # gone, defunct, forgotten, inaccessible so $scan == 'foo'
    
  2. or download this
    print "
            =======================================
    ...
            =======================================
    
    ";
    
  3. or download this
    print "Oops";
    die;
    
    # might as well be
    die "Oops";
    
  4. or download this
    open FILE, $somefile or die "Could not read $somefile, perl says the e
    +rror is $!\n";
    
    ...
    # that it binds tighter than the , operator so you need parnes thusly
    
    open (FILE, ">$somefile") || die "Could not write $somefile, $!\n";
    
  5. or download this
    while ( my $line=<FILE> ) { blah }
    
  6. or download this
    volume ;my_hacking_script_that_will_now_get_executed.pl
    
  7. or download this
    system(@stuff)
    check_call($custom_message,@stuff);
    ...
    Actual call was
    system( "@call" )!;
    }
    
  8. or download this
    use Carp;
    
    ...
        main::three() called at script line 6
        main::two() called at script line 5
        main::one() called at script line 3
    
  9. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        blah\n\n";
      exit;
    }
    
  10. or download this
    package Error::Custom;
    
    ...
    }
    
    1;