never mind that last one, I fat fingered the code:
here's the actual cut and paste code:

#!/usr/local/bin/perl -w
use strict;


my $hstr1 = "fee fie foe foo";
my $href1 = { string => $hstr1 };
$href1->{string} =~ m/e/mcg;
print "position is ".pos($href1->{string})."\n";

my $hstr2 = "fee fie foe foo";
my $href2 = { string => $hstr2 };
my @matches = $href2->{string} =~ m/e/mcg;
print "position is ".pos($href2->{string})."\n";


and heres the cut and paste output:

position is 2
Use of uninitialized value in concatenation (.) at .//junk.pl line 13.
position is 


when I grab the match results by saying:

        my @matches = ...regexp...

it seems like it messes up the pos value.

huh?

Greg

Reply via email to