home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!mcsun!sun4nl!alchemy!henkp
- From: henkp@cs.ruu.nl (Henk Penning)
- Subject: why is this illegal ??
- Sender: network-news@cs.ruu.nl
- Message-ID: <1992Jul30.235951.16495@cs.ruu.nl>
- Date: Thu, 30 Jul 1992 23:59:51 GMT
- Organization: Utrecht University, Dept. of Computer Science
- Lines: 29
-
- Perl prog:
- -----------------------------------------------
- # why is this illegal ??
-
- $res = ( -f ? 'hip' : 'hop' ) ;
-
- # what I try to do is: grep plain files from a directory and save the stats
- # @res = grep( ( -f ? ( $f{$_} = join($;,stat(_)) ) : 0 ) , readdir(DIR) ) ;
- -----------------------------------------------
- I get :
-
- Search pattern not terminated in file try at line 3, next char ^?
- syntax error in file try at line 7, next char ;
- Execution of try aborted due to compilation errors.
-
- perl -v :
-
- This is perl, version 4.0
-
- $RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
- Patch level: 35
-
- Copyright (c) 1989, 1990, 1991, Larry Wall
-
- Perl may be copied only under the terms of either the Artistic License or the
- GNU General Public License, which may be found in the Perl 4.0 source kit.
-
- === HenkP ===
-
-