send die "" to a file

2008-09-25 Thread aa aa
Hi, I try to open several files, if one of them failed, my program will die and then send the died information to a file. eg. open(AA, "a.txt") or die "can't open file a.txt\n"; But I want to this string "can't open file a.txt\n" print to a file. Is anyone can help me? org.chen _

modify filename by using regular expression

2008-09-23 Thread aa aa
Hi everyone, I get an string from an filename, and then create an mysql table using that filename. Since the rule is different, eg, a file name AA3bb.cc is ok but it can't used as a mysql table's name. So that I will modify that file name to AA3bb-cc. That means if any character in the filename