Path: utzoo!attcan!uunet!mailrus!cs.utexas.edu!usc!ucsd!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: Misuse? Or a bug? Message-ID: <1990Jun28.175759.22152@iwarp.intel.com> Date: 28 Jun 90 17:57:59 GMT References: <163@sun13.scri.fsu.edu> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 27 In-Reply-To: nall@sun8.scri.fsu.edu (John Nall) In article <163@sun13.scri.fsu.edu>, nall@sun8 (John Nall) writes: | I thought that $_ was the default, so the two should be equivalent. | Am I doing something wrong? Or is it a bug? (Obviously, it is | easy to workaround, so I'm more concerned with whether or not I am | misunderstanding the manual than anything else). The relevant portion from the manpage says: ....... If (and only if) the input symbol is the only thing inside the conditional of a while loop, the value is automatically assigned to the variable "$_". .............. Doesn't say anything about the conditional of an "if". In fact, early releases wouldn't let you say: print while <>; Instead, you had to say: print while $_ = <>; print "$ARGV[push(@ARGV,'Just another Perl hacker,')]" -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/