Re: C & Perl for loops

2001-07-13 Thread Maxim Berlin
Hello Rich, Friday, July 13, 2001, Busse, Rich <[EMAIL PROTECTED]> wrote: BR> In C, I can do something like this: BR> char ch ; BR> char sz [] = "?:\\dir\\myfile.ini" ; BR> for ( ch = 'c' ; ch <= 'z' ; ch++ ) BR> { BR> sz[0] = ch ; BR>

Re: C & Perl for loops

2001-07-13 Thread Aaron Craig
At 07:09 13.07.2001 -0400, Busse, Rich wrote: >In C, I can do something like this: > > char ch ; > char sz [] = "?:\\dir\\myfile.ini" ; > for ( ch = 'c' ; ch <= 'z' ; ch++ ) > { > sz[0] = ch ; > . . . > >to spin thru all the possible

Re: C & Perl for loops

2001-07-13 Thread Gary Stainburn
Hows about my $sz='?:\\dir\\myfile.ini'; foreach my $ch (c..z) { substr($sz,0,1)=$ch; ... } my $sz='A string'; foreach my $ch (split(//,$sz)) { print "$ch\n"; } Gary On Friday 13 July 2001 12:09 pm, Busse, Rich wrote: > In C, I can do something like this: > > char ch ; > char

C & Perl for loops

2001-07-13 Thread Busse, Rich
In C, I can do something like this: char ch ; char sz [] = "?:\\dir\\myfile.ini" ; for ( ch = 'c' ; ch <= 'z' ; ch++ ) { sz[0] = ch ; . . . to spin thru all the possible drives on a Windows NT box. But Perl complains about trying t