On May 8, John Joseph Trammell said:

>On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote:
>>  22  while (<IF>) {
>>     23      if (/$LOCTAG/i) {
>>     24          ($curloc) = /VALUE="([^"]+)"\s*\w*>/i;
>>     25          $location .= "${curloc}::";
>>     26      }
>>     27
>>     28      if (/$TYPETAG/i) {
>>     29          ($curtype) = /VALUE="([^"]+)">/i;
>>     30          $jobtype .= "${curtype}::";
>>     31      }
>>     32  }
>>     33  close(IF);
>>     34  $location =~ s/::$//;
>>     35  $jobtype =~ s/::$//;
>
>Lines 24, 29; perhaps you mean "=~" ?

No.  Doing:

  ($foo) = /pattern/;

is the same as:

  ($foo) = $_ =~ /pattern/;

What he's doing is getting the ()'d part of the regex, and storing it in
$curloc.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734

Reply via email to