Help for this page

Select Code to Download


  1. or download this
    Deleting an array element effectively returns that position of the arr
    +ay to its initial, uninitialized state.  Subsequently testing for the
    + same element with exists() will return false.  Note that deleting ar
    +ray elements in the middle of an array will not shift the index of th
    +e ones after them down--use splice() for that.  See "exists".
    
  2. or download this
    #!/usr/bin/perl -w
    
    ...
    __END__
    length = 4
    length = 4
    
  3. or download this
    first
    second
    third
    fourth
    
  4. or download this
    use Tie::File;
    
    ...
    $lines[1] = $lines[0];
    shift(@lines);
    untie @lines;
    
  5. or download this
     
    first
    third
    fourth