Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by gamesthreshold

  1. gamesthreshold

    Null characters with Pattern matching doesn't work?

    lmfao I made a mistake in my code (shoulda just posted the code in the first place...) # Incomming TCP data sub proto_read_tcp { my $sock = shift; my $nlen = shift; return unless $nlen; # Verify new data has been added to the buffer alias $sock{$sock}->{ibfr}, my $ibfr...
  2. gamesthreshold

    Null characters with Pattern matching doesn't work?

    # This one works: my $lnbk = "\r\n"; $var =~ m{\G(.*?)$lnbk}gc # This one fails: my $null = chr(0); $var =~ m{\G(.*?)$null}gc Why won't the regex work with a Null character? But this does work... s/(.*)$null//g I don't want to use the replacement, but "walk" the variable as I have been...
  3. gamesthreshold

    Pattern Matching Problem

    Never mind thanks anyway... Figured out how to use the non greedy *?... *oops*
  4. gamesthreshold

    Pattern Matching Problem

    I'm trying to "walk" a string, and fill $1/$2 with a string and a character which follows it. Heres an example... my $istr = "TESTING();"; pos $istr = 0; while (pos $istr < length $istr) { if ( $istr =~ m{ \G (.*) ([ (); ]) }gcxms ) { print("1: $1; 2...

Part and Inventory Search

Back
Top