home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / languages / perl / nutshell / ch4 / open < prev    next >
Encoding:
Text File  |  1992-10-18  |  276 b   |  10 lines

  1. $ARTICLE = 100;
  2. open ARTICLE || die "Can't find article $ARTICLE: $!\n";
  3. while (<ARTICLE>) {...
  4.  
  5. open(LOG, '>>/usr/spool/news/twitlog'); # (log is reserved)
  6.  
  7. open(ARTICLE, "caesar <$article |");   # decrypt article
  8.  
  9. open(EXTRACT, "|sort >/tmp/Tmp$$");    # $$ is our process#
  10.