in reply to Regex to check for beginning character
@lines = (' #', 'nope', '# yep', 'oops #'); foreach(@lines) { print "yahoo! $_\n" if (/^\s*#/); } [download]