On May 8, Anshu Anshu said:
> 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/::$//;
It would be much appreciated if you gave us an error message. My guess is
that there are characters in $LOCTAG and $TYPETAG that Perl is using as
regex characters. Try:
if (/\Q$LOCTAG\E/i) { ... }
if (/\Q$TYPETAG\E/i) { ... }
instead. Or, consider using index() instead:
if (index(lc, lc($LOCTAG)) > -1) { ... }
--
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