hello all,

I have a file read into a single string, and I want to write a regex that will tell me wether the file contains any non hashed line

This is my test script




#!/usr/bin/perl # { local($/)=undef; $str=<DATA>; } print $str; if($str=~/^\s*[^#]/m){ print "NOT ENTIRELY COMMENT"; } else { print "ENTIRELY COMMENT"; } print "\n";



__DATA__
## FORWARD
## FORWARD
## VACATION
## VACATION
__END__

But my regex fails in case of any blank lines or lines containing all white space

Can anyone help me out

Thanks
Ram




-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to