[index] [text page] [<<start] [<prev] [next>] [last>>]
Page 34: Perl's magic open

Page 34

  
  Perl's magic open
  In general, 'magic' open is a bad idea.
  open FH, $file;
  Can be abused by supplying a filename containing pipes, such as
          /usr/bin/program |
          |/usr/bin/program
  open FH, "<$file";
  Doesn't work if file contains leading or trailing spaces, such as ' myfile' or 'myfile '

Copyright 2003, Bri Hatch of Onsight, Inc.

Presented at SPUG, 2003.

Presentation created using vim and MagicPoint.