home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5501 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  919 b 

  1. Path: sparky!uunet!mcsun!sunic!dkuug!uts!id.dth.dk!ej
  2. From: ej@id.dth.dk (Erik Johansen (EMP))
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Null output as a string?
  5. Message-ID: <1992Aug25.120446.25067@id.dth.dk>
  6. Date: 25 Aug 92 12:04:46 GMT
  7. References: <1992Aug25.003027.9383@kakwa.ucs.ualberta.ca>
  8. Organization: Department of Computer Science
  9. Lines: 22
  10.  
  11. sherwood@fenris.space.ualberta.ca (Sherwood Botsford) writes:
  12.  
  13. >@message = `/usr/local/bin/gfind . -user $u -atime +9 -ls  
  14. >`;
  15. >if (@message != "")    {
  16. >  print("mail sent to $u\n");
  17. >  open( MAILOUT, "|/usr/ucb/Mail -s \"48 Hr Notice:  
  18. >/u/scratch purge\" $u");
  19. >..
  20.  
  21. If you want to use string compare - use string operands.
  22. In other words it should work if you write
  23.  
  24. $message = `/usr/local/bin/gfind . -user $u -atime +9 -ls`;
  25. if ($message ne "")    {
  26. ...
  27.  
  28.  
  29. -- 
  30. ---
  31. Erik Johansen                  E-mail: ej@id.dth.dk
  32. Institute for Computer Science, Copenhagen, Denmark
  33.