[index] [text page] [<<start] [<prev] [next>] [last>>]
Page 30: Avoid external programs

Page 30

  
  Avoid external programs
  Rather than worry about how external program interaction works, it's best to avoid it entirely.
    # Why use /bin/rm, when perl already has
    # that ability built in?
    unlink <*>;
  or better yet
    # Do them one at a time, so we can show failures.
    for ( <*> ) {
        unlink $_ or print "Unable to unlink $_\n"
    }

Copyright 2003, Bri Hatch of Onsight, Inc.

Presented at SPUG, 2003.

Presentation created using vim and MagicPoint.