in reply to Re^6: String Matching
in thread String Matching

On line 26 you have the following:

$_ //= '' for $user, $rip, $op, $srvrip, $from, $msgid, $msgdate, $msg +time;

The //= operator was introduced in 5.10.0. As you mentioned, you're running this on a 5.8.x version of Perl. That's giving the compiler fits. Change that line to:

$_ = defined ? $_ : '' for $user, $rip, $op, $srvrip, $from, $msgid, $ +msgdate, $msgtime;

Or maybe a little more clarity:

use constant EMPTY_STRING => q{}; # ..... foreach ( $user, $rip, $op, $srvrip, $from, $msgid, $msgdate, $msgtime + ) { $_ = EMPTY_STRING # Alias propagates to foreach list. if not defined $_; }

Dave

Replies are listed 'Best First'.
Re^8: String Matching
by AnomalousMonk (Archbishop) on Aug 14, 2012 at 22:51 UTC

    Hey, wait a minute... Hey, wait a minute... Hey, wait a minute...

      What's going on here?! Get off this frequency! (j/k)

      :)


      Dave