home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!usc!news!netlabs!lwall
- From: lwall@netlabs.com (Larry Wall)
- Newsgroups: comp.lang.perl
- Subject: Re: Bad label: _EVAL_
- Message-ID: <1992Sep4.172952.2766@netlabs.com>
- Date: 4 Sep 92 17:29:52 GMT
- References: <1992Sep3.082620.13684@sbil.co.uk> <JKT.92Sep3135937@seneca.SED.Provo.Novell.COM>
- Sender: news@netlabs.com
- Organization: NetLabs, Inc.
- Lines: 29
- Nntp-Posting-Host: scalpel.netlabs.com
-
- In article <JKT.92Sep3135937@seneca.SED.Provo.Novell.COM> jkt@SED.Provo.Novell.COM (Jack Thomasson) writes:
- : >>>>> On 3 Sep 92 08:26:20 GMT, jim@spitws117.sbil.co.uk (James
- : >>>>> Gillespie) said:
- :
- : James> open (OUTPUT, "> $oldfile") || die "Couldn't open '$oldfile' for writing\n";
- :
- : the old "how many single quotes was that, anyway?" bug. try:
- :
- : ... || die "could not open $oldfile for writing\n"; # avoid the problem
- :
- : or
- :
- : ... || die "couldn\'t open \'$oldfile\' for writing\n"; # escape the
- : problem
-
- Well, er, actually, no. You can put as many single quotes inside double
- quotes as you like. Perl isn't like the shells--there's generally only
- one level of interpretation going on inside a quoted string. I'm always
- vaguely amused when I see someone putting
-
- die "Can not snuffle quietly: $!"
-
- because I know they're probably being superstitious. I'd say
-
- die "Can't snuffle quietly: $!"
-
- This is OK in Perl. By design.
-
- Larry
-