Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!munnari.oz.au!brolga!psych!grunt!eay From: eay@psych.psy.uq.oz.au (Eric Young) Newsgroups: comp.lang.perl Subject: Re: next if C VS if (C) { next } Message-ID: Date: 23 May 91 00:14:20 GMT References: <1991May22.021106.13838@convex.com> Sender: news@grunt.psy.uq.oz.au (Grunt's News) Organization: Psychology Dept, University of Queensland, AUSTRALIA Lines: 31 In article <1991May22.021106.13838@convex.com>, tchrist@convex.com (Tom Christiansen) writes: >VERSION 1: > for ($i = 0; $i < 100000; $i++) { > if ($i) { next; } > } >VERSION 2: > for ($i = 0; $i < 100000; $i++) { > next if $i; > } On a sun4/75 - sunOS 4.1.1 - perl v 4.0.1.1 pl 3 with a trace perlscript I get 10000 'sigcleanup () = 0' system calls when I run VERSION 1 I did not get all these system calls with VERSION 2. I assume the problem is with next out of the { }. trace -c version1 100000 sigcleanup 8 close 7 mmap 5 open ... trace -c version2 8 close 7 mmap 5 open ... eric --- Eric Young | Systems programmer - Psychology Dept. Queensland Uni. ARNnet | eay@psych.psy.uq.oz.au.