Hi sheasbys,

I'm afraid your going to wince when I tell you this...

You simply forgot a comment character:

-----Generate the output string-----

but it should be:

#-----Generate the output string-----

That's why you're getting the "Can't modify negation (-) in predecrement (--) ..." message ;-)

Update:  By the way, with Perl programming you can make things easier for yourself by adding two lines to near the beginning of the script:

use strict; use warnings;

Granted you will now get lots of warning messages:

Global symbol "$line2" requires explicit package name at SS7Merge.pl l +ine 37. Global symbol "$date" requires explicit package name at SS7Merge.pl li +ne 38. Global symbol "$number_dialed" requires explicit package name at SS7Me +rge.pl line 39. Global symbol "$line2" requires explicit package name at SS7Merge.pl l +ine 41. Global symbol "$date" requires explicit package name at SS7Merge.pl li +ne 41. Global symbol "$line2" requires explicit package name at SS7Merge.pl l +ine 41. Global symbol "$number_dialed" requires explicit package name at SS7Me +rge.pl line 41. Global symbol "$record_type" requires explicit package name at SS7Merg +e.pl line 42. Global symbol "$carrier_info" requires explicit package name at SS7Mer +ge.pl line 45 ...

but in the long run this will help more than hinder, as your mistakes will be caught early and often.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

In reply to Re: Merging specific data from 2 files into a third. by liverpole
in thread Merging specific data from 2 files into a third. by sheasbys

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.