On Mon, Aug 13, 2001 at 03:12:10PM -0400, Greg London wrote:
> folks,
> 
> I can call 'pos' on a scalar string
> and get the location of the last match:
> 
> $grafitto = "fee fie foe foo";
> $grafitto =~ m/e/mcg;
> $position = pos $grafitto;
> print "position is $position \n";
> 
> this prints "position is 2"
> 
> can I NOT call pos if the thing being matched
> is stuffed away inside another object?
> in this case a hash:
> 
> $href = { string => $string };
> $href->{string} =~ m/e/mcg;
> $position = pos $href->{string};
> print "position is $position \n";
> 
> this prints out "position is "

What happens if you set $href to { string => "fee fie foe foo" } ?  :)

Ronald

Reply via email to