I'm still trying to crawl to the table to grab the scissors...

So, I've done this and it works:

use strict; use warnings; open my $textfile, '<', 'C:\Users\msmolik\Desktop\PERL test stuff\tes +tfile.log' or die $!; while ( my $dtmf = <$textfile>) { if ( $dtmf =~ m/ccParty<(.+)>.+DTMF<(\*\d)>/ ) { print "$dtmf\n"; } } { close $textfile; }

and was able to do this:

use strict; use warnings; print "What is the conference hexidecimal name?\nInput Name:"; my $Conf_Hex = <>; chomp ($Conf_Hex); while ( my $polling = <$textfile>) { if ( $polling =~ m/VtO<.+> VtTp<(?!0)(\d{1,3})>.+MCfID<0x$Conf_Hex +>/ ) { print "$polling\n"; } } { close $textfile; }

Now, I've code that will convert a number in decimal to a hexidecimal. But I can't figure out how to combine that in the second code above to ask for the number then use the hexidecimal output instead of asking for the hexidecimal input.

I guess in simple form, I want the conversion code to ask for a number. I give it 18. The output is 12. I then want to take that 12 and put it in the line of code above in place of the $Conf_Hex value in the "if" statement.

Here's the code for the conversion:

print "What is the Conference IDX?"; my $num = <>; chomp ($num); exit unless defined $num; $num = oct($num) if $num =~ /^0/; printf = ("%x\n", $num) ;

Anyway, I'll keep plugging along. Thank you to everyone for suggestions and pushing me in the right direction.


In reply to Re^5: Perl = Greek to me by smolikmd
in thread Perl = Greek to me by smolikmd

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.