in reply to Not looping... Am I a moron?
...Or, if you aren't trying for a do/while loop, just testing for ".dat" in the string, maybe you want:for (@_) { do { # stuff to do here } while (/\.dat/); }
You may also want to replace /\.dat/ with /(\.dat)$/ to make sure that's the file extension, so "test.dat.old" wouldn't be a match.for (@_) { if (/\.dat/) { # stuff to do here } }
|
|---|