Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!uw-beaver!cornell!mailrus!ames!elroy!cit-vax!ucla-cs!sdcrdcf!markb From: markb@sdcrdcf.UUCP Newsgroups: comp.sources.d Subject: Re: Perl question: what do {{ and }} mean? Message-ID: <5367@sdcrdcf.UUCP> Date: 30 Jun 88 18:04:18 GMT References: <335@rhesus.primate.wisc.edu> Reply-To: markb@sdcrdcf.UUCP (Mark Biggar) Organization: Unisys - System Development Group, Santa Monica Lines: 18 In article <335@rhesus.primate.wisc.edu> bin@rhesus.primate.wisc.edu (Brain in Neutral) writes: >The perl 2.0 manual contains two examples that use {{ and }} >instead of { and } to bracket subroutines. One of them says >to note the double curly brackets. But what do they mean? >The explanation is not in the manual, or at least I can't >find it. Those are realy 4 symbols not 2. The {} that delimit the body of a subroutine are not a BLOCK (see man page) so if you want to do things like use "last" as a pseudo-return statement you have to have an additional set of {} delimiting a real BLOCK. I have complained about this to Larry before (as well as I can see no reason why "last" can work right in a "do { ... }" expression too.) Mark Biggar {allegra,burdvax,cbosgd,hplabs,ihnp4,akgua,sdcsvax}!sdcrdcf!markb markb@rdcf.sm.unisys.com