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 to compare/increment a non-numeric. Any way around this? Also, to look at each character in a string, I can do: int i ; char sz [] = "A string" ; for ( i = 0 ; i < strlen (sz) ; i++ ) { ch = sz [i] ; . . . How do I access each character in a string with Perl? TIA...
- Re: C & Perl for loops Busse, Rich
- Re: C & Perl for loops Gary Stainburn
- Re: C & Perl for loops Aaron Craig
- Re: C & Perl for loops Maxim Berlin