in reply to Forcing array context

I want to use a scalar $string in a very C-like way
<plug>

You could always use Data::Pointer e.g

use Data::Pointer qw( char_ptr ); for(my $p = char_ptr("a string of characters"); $p->deref; $p->incr) { print '[', $p->deref, ']'; } __output__ [a][ ][s][t][r][i][n][g][ ][o][f][ ][c][h][a][r][a][c][t][e][r][s]
Ok, so it's not terribly C like, but the concept is there. Hopefully I'll be able to grok overload and XS one day and get a real pointer implementation, until then this shoddy implementation will have to do ;)

</plug>


HTH

_________
broquaint