jrasillo has asked for the wisdom of the Perl Monks concerning the following question:
Formerly titled "I need help ASAP!"
I'm doing pattern matching through an array, and it seems to work fine the first time it finds the pattern, but if it keeps on trying to find it for second time it fails...chomp $_myfile[$i];#name of my array if ($_myfile[$i] =~ /Content-Transfer-Encoding: (.*)/) {$encoding = $1;} if ($encoding eq "quoted-printable") {do whatever}
The first time my code runs it matches against Content-Transfer-Encoding just fine, and $encoding gets the stuff after the colon, but the second time it runs $encoding gets nothing...
can anyone help me?
The purpose is getting quoted printable out of that line...Edit 2002-03-31 by the node bunny : Fixed formatting and moved to correct section
Edited Sun Mar 31 22:43:52 2002 (UTC), by footpad : Changed title to be more descriptive.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with multiple matches
by rdfield (Priest) on Mar 31, 2002 at 09:53 UTC | |
|
Re: Help with multiple matches
by jepri (Parson) on Mar 31, 2002 at 13:55 UTC | |
|
Re: Help with multiple matches
by Maclir (Curate) on Mar 31, 2002 at 22:23 UTC |