Without seeing the specifics of your code, it's going to be hard to tell.

When I try to duplicate your results, I get the "expected" result, not a "02".

#!/usr/bin/perl use warnings; use strict; my $blob = <DATA>; if ( $blob =~ /PROGRAM=(.*)\\/ ) { print "Dollar One = $1\n"; } __DATA__ SAOHXXX20090209XXX020607XXXchazerpap07_PRD_00XXX1XXXN0013IT_QALS-LWEDT +L000216V00 0820090207X000800000000X000800000000X000833333333X00082009 +0207N0004JESTL000268V0 034 000X00340000000000000000000000000000000000 +X003 400000000000XXX00000000000000000000000X0034222222222222222222222 +2222222222333X00 340000000000000000000000000000000000N0014<%_TABLE_MA +KT>L0003204V0003???X0006???? ??X0006??????N0009IT_LIST[]L00018V0019Ta +ble IT_1042x76XXX0TH034\PROGRAM=ZKQMR_ INSP\DATA=IT_LIST[]TH100Table +reference: 56 TH055TABH+ 0(20) = FFFFFFFCC883EE98 FFFFFFFCC895FBB800X +XX000000TH055TABH+ 20(20) = 000000380000006800000002000002F8F FFFFFFF +TH047TABH+ 40(16) = 0400000000004040001024C401800000TH033store = 0 xF +FFFFFFCC883EE98TH033ext1 = 0xFFFFFFFCC895FBB8TH033sXXXhmId = 0 (0x000 +00000)TH033id = 56 (0x00000038)TH033label = 104 (0x00000068)TH033fill + = 2 (0x00000002)TH033leng = 760 (0x0 00002F8)TH033loopXXX = -1 (0xFF +FFFFFF)TH026xtyp = TYPE#000328TH033oc cu = 16 (0x00000010)TH039access + = 1 (ItAccessStandard)TH034 idxKind = 0 (ItIndexNone)TH034uniKind = +2XXX(ItUniqueNon)TH030keyK ind = 1 (default)TH032cmpMode = 8 (cmpMany +Eq)TH016occu0 = 1TH016groupCntl = 0TH016rfc = 0TH016unShareable = 0TH +017mightBeS hared = 0TH020sharXXXedWithShmTab = 0TH016isShmLockId = 0 +TH016gcKind = 0T H016isUsed = 1TH016isCtfyAble = 1TH039>>>>> Shareabl +e Table Header Data <<<<<TH033tabi = 0xFFFFFFFCC881FDE8%M
And the results are:

C:\Code>perl parse_blob.pl Dollar One = ZKQMR_ INSP

In reply to Re: Very Strange Result from REGEX by dwm042
in thread Very Strange Result from REGEX by rementis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.