in reply to Regex to check for beginning character

What about leading whitespace? Assuming you want to return the items starting with a # then :-
@lines = (' #', 'nope', '# yep', 'oops #'); foreach(@lines) { print "yahoo! $_\n" if (/^\s*#/); }
Just a thought
UnderMine