I sure am a perl novice. Its not homework, its a little project script I am working on.
sorry, I mistyped that regex, this "$imgNumber =~/^(\d{6})/" not "^(\d)$" is what gave me 012346.jpg. I took care of the .jpg by just recursively printing "$imgNumber.jpg"; and it worked.
I was just confused as to how to catch the "-ALL" or "-EXP" "-SAMPLE" part of it with regular expressions.
And if possible, I sure would like some teaching on regex. i googled some tut but was still quite confused. Thanks for the help.