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
- [Boston.pm] pos on string in hash Greg London
- Re: [Boston.pm] pos on string in hash Ronald J Kimball
- Re: [Boston.pm] pos on string in hash Greg London
- Re: [Boston.pm] pos on string in hash Sean Quinlan
- Re: [Boston.pm] pos on string in hash Greg London
- Re: [Boston.pm] pos on string in hash j proctor
- Re: [Boston.pm] pos on string in hash j proctor
- Re: [Boston.pm] pos on string in hash Greg London
- Re: [Boston.pm] pos on string in hash Daniel R. Allen
- Re: [Boston.pm] pos on string in hash Chris Devers
- Re: [Boston.pm] pos on string in hash Ronald J Kimball
- Re: [Boston.pm] pos on string in hash John Tobey
- Re: [Boston.pm] pos on string in hash Dan Sugalski
