sub extract_terms(){ my $input = shift; chomp $input;
Your prototype says "accept NO arguments" for this subroutine. Your next statement says that this subroutine accepts ONE argument. Do not use prototypes unless you are attempting to imitate one of Perl's built-in functions.
Far More than Everything You've Ever Wanted to Know about Prototypes in Perl -- by Tom Christiansen
Your use of chomp here implies that this subroutine only deals with lines input from files? Where is the rest of the file line handling code?
In reply to Re: Regex with multiple pattern omissions
by jwkrahn
in thread Regex with multiple pattern omissions
by jhoop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |