home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 5051 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.1 KB  |  40 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!mcsun!sun4nl!alchemy!henkp
  3. From: henkp@cs.ruu.nl (Henk Penning)
  4. Subject: why is this illegal ??
  5. Sender: network-news@cs.ruu.nl
  6. Message-ID: <1992Jul30.235951.16495@cs.ruu.nl>
  7. Date: Thu, 30 Jul 1992 23:59:51 GMT
  8. Organization: Utrecht University, Dept. of Computer Science
  9. Lines: 29
  10.  
  11. Perl prog:
  12. -----------------------------------------------
  13. # why is this illegal ??
  14.  
  15. $res = ( -f ? 'hip' : 'hop' ) ;
  16.  
  17. # what I try to do is: grep plain files from a directory and save the stats
  18. # @res = grep( ( -f ? ( $f{$_} = join($;,stat(_)) ) : 0 ) , readdir(DIR) ) ;
  19. -----------------------------------------------
  20. I get :
  21.  
  22. Search pattern not terminated in file try at line 3, next char ^?
  23. syntax error in file try at line 7, next char ;
  24. Execution of try aborted due to compilation errors.
  25.  
  26. perl -v :
  27.  
  28. This is perl, version 4.0
  29.  
  30. $RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
  31. Patch level: 35
  32.  
  33. Copyright (c) 1989, 1990, 1991, Larry Wall
  34.  
  35. Perl may be copied only under the terms of either the Artistic License or the
  36. GNU General Public License, which may be found in the Perl 4.0 source kit.
  37.  
  38.                     ===  HenkP  ===
  39.  
  40.