home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!gatech!psuvax1!flee
- From: flee@cs.psu.edu (Felix Lee)
- Subject: Re: Truncating or rounding "floats" and bug with ($_==int?2:3)
- Message-ID: <Bs4zo9.6qE@cs.psu.edu>
- Sender: news@cs.psu.edu (Usenet)
- Nntp-Posting-Host: dictionopolis.cs.psu.edu
- References: <nomi.712368419@pooh.mmwb.ucsf.edu> <rantapaa.712384725@s6.math.umn.edu>
- Date: Wed, 29 Jul 1992 07:07:18 GMT
- Lines: 12
-
- Erik E. Rantapaa:
- > BTW, the following gives a syntax error (SunOS, patchlevel 19):
- > ( $_==int ? 2 : 3)
-
- That's because 'int' expects an argument, and '?' in an argument
- position is the '?PATTERN?' operator, not the '?:' operator.
-
- Perl 4.0 pl 35 gives this message for the above statement:
- > Warning: Use of "int" without parens is ambiguous at - line 1.
- > Search pattern not terminated in file - at line 1, next char ^?
- > syntax error in file - at line 2, next char ;
- --
-