|
Posted by Trev on June 28, 2008, 1:12 pm
Please log in for more thread options wrote:
> "Trev" wrote:
>
> > Thanks, I've made the changes and so far so good.
>
> foreach $cpqlog (@cpqlog_data) {
> =A0 =A0 {
> =A0 =A0 chomp($cpqlog);
>
> =A0 =A0 if ($cpqlog =3D~ /MAC/) {
> =A0 =A0 =A0 =A0 $cpqlog =3D~ s/ =A0<FIELD NAME=3D"Subject" VALUE=3D"//i;
> =A0 =A0 =A0 =A0 $cpqlog =3D~ s/ =A0<FIELD NAME=3D"MAC" VALUE=3D"//i;
> =A0 =A0 =A0 =A0 $cpqlog =3D~ s/"\/>//i;
> =A0 =A0 }
> =A0 =A0 }
>
> }
>
> You do understand that the above code does not actually change anything i=
n
> the file, right? The substitutions in $cpqlog are just discarded at the e=
nd
> of the loop.
>
> Oh, and you might want to get rid of the superfluous { }'s...
Yeah, I figured that out, I added a print BOO so the results are
writen to a file which I load in the next sub. This might not be the
best code but I'm still learning.
|