Sorry, I did not state quite clear, if it is machine or not, I want to say if I it is the right file or not...
Lixin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 5:07 PM Cc: [EMAIL PROTECTED] Subject: regular expression question all, I want to check the first line of the file if it is machine or not, like The first line of the file is: Job "\nest and \toolbox VOBs" began execution on 9/6/02 at 2:00:11 AM. my code is like: if (!-z $file) { open(LOG_FILE, "<$file") or warn " can not open $file:$!\n"; my @read_lines = <LOG_FILE>; close (LOG_FILE); next unless chomp($read_lines[0]) =~ m#\"\nest and \toolbox VOBs\"#; } it did not work for regular expression, can you help me to figure what is wrong with it? Thanks a lot! Lixin _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs